MDX - Ranking And Ordering By a Measure Value
The following example is based on an Adventure Works cube and shows you how to create a measure that ranks countries according to sales revenue.
It implements the following MDX functions:
- Rank
- CurrentMember
- Children
- Order
Rank by Largest to Smallest
The MDX WITH MEMBER statement creates a temporary measure for the rank value based on total internet slaes in the calendar year 2006, and the associated SELECT part uses the rank to order the countries.