Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Help with Ranking

Hi!

I'm looking for help with the ranking function:
I am looking for the DAX formula to rank Stores depending on the Value and within the same Cluster.
I have one table with Clusters and corresponding Stores in column; the Value is a calculated measure

For example:
- I have 5 Stores with their respective Cluster
- the same visual contains all Clusters (not filtered with any slicer)
- my current formula calculated the ranking on all stores :
Ranking = RANKX((ALLSELECTED(Stores));Value)

 

Here is the result:

 

ClusterStoreValueRanking
Aa55
Ab104
Bc501
Cd302
Ce203


Here is what I'm looking for:

 

ClusterStoreValueRanking
Aa52
Ab101
Bc501
Cd301
Ce202



How do I get the ranking by Cluster?

 

Thank you very much!

2 Replies