Rank function
Hi Everyone,
I am trying to use the rank function in Pyramid (similar to rank function in excel) to rank customers with highest revenue to lowest. The environment used is MS OLAP.
The Rank function in Pyramid says:
Rank(<data point>,<set>,<numeric data point>)
Please explain how to use this to rank customers having highest revenue for a particular period (period given under filters)
Thanks,
Manshi
2 replies
-
Hi Manshi,
I've created the next example to explain how the Rank function is working in Pyramid.
I've created a formula and use the "Rank" function from the Tool panel>Numeric section
Rank(<data point>,<set>,<numeric data point>).- In the first part (Data point), drag the data point node and select the required hierarchy current member as described in the next image:
- In the second part select the "Model attribute" node to the formula and select the hierarchy.
- By writing Currentmember.siblings you will rank members of the hierarchy relative to their siblings
- In the third part of the formula select the measure you want to rank by.
This is how it looks in script mode:
Rank([Customer].[Customer Geography City].CurrentMember,[Customer].[Customer Geography City].CURRENTMEMBER.SIBLINGS,[Measures].[Sales] ) - In the report, select the customer hierarchy on rows, the RANK formula on columns and the time hierarchy on the filter (I've added the ranked measure as well).
As you can see when drilling down to Germany, all Germany cities are also ranked in comparison to their level (city) siblings.
Hope this help.
- In the first part (Data point), drag the data point node and select the required hierarchy current member as described in the next image:
-
Dvir Buzaglo
Hi Dvir,
Thank you so much. This helped really. I have modified it a little to meet the requirement.
Regards,
Manshi