Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX solution for Ranking with a tolerance

$
0
0

I'm trying to find a efficient way to handle a ranking problem. I have a dimension called FA (for Financial Advisors) and there is also a measure called [Measures].[Production] which represents the dollar ammount of revenue that they bring in to a firm. I would like to be able to rank these FAs using MDX and be able to indicate whether there is a Tie. But to complicate things I need to have a "tolerance" applied to the set. For example, if one FA had a Production value of $500,000 and another FA had a Production value of $500,010 then MDX would rank them seperately by default - however the business wants to consider these "equal" by applying a tolerance of 1%. So if we compare apply the tolerance of 1% to $500,000 we get 5000. Since $500000 and $500010 are with 5000 of each other they should be tied, and so on. Essentially for each member of the ordered set we need to apply the tolerance and check if the next member is within that tolderance and if so indicate it as a tie.

Any ideas on how to do that in MDX? If not in MDX any other approaches that might work better?

Scott


Viewing all articles
Browse latest Browse all 14337

Trending Articles