![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Dear all, I want to sort a list of supplier according to their sales amount in descending order. Then, the rank of the currentmember is shown as a calculated member. Does anyone know how to write the MDX? Thanks! Polly |
#3
| |||
| |||
|
|
Create a ordered set. Then create a calculated member using the Rank function. Here's an example from the Foodmart sample. WITH SET [Ordered Suppliers] AS ' { Order( Filter ( { [Customers].[Name].Members }, NOT IsNull( ([Measures].[Store Sales]) )) , ([Customers].CurrentMember, [Measures].[Store Sales]), DESC) } ' MEMBER [Measures].[Sales Rank] AS ' Rank ( [Customers].CurrentMember, { [Ordered Suppliers] }) ' SELECT { [Measures].[Store Sales], [Measures].[Sales Rank] } ON COLUMNS, { [Ordered Suppliers] } ON ROWS FROM [Sales] WHERE ( [Time].[1997]) "Polly" <Polly (AT) discussions (DOT) microsoft.com> wrote in message news:AC8E20C2-094F-45E8-A7C1-1F93167620F3 (AT) microsoft (DOT) com... Dear all, I want to sort a list of supplier according to their sales amount in descending order. Then, the rank of the currentmember is shown as a calculated member. Does anyone know how to write the MDX? Thanks! Polly |
![]() |
| Thread Tools | |
| Display Modes | |
| |