Forum Discussion
Ramachandran
4 years agoHelper III
How to get Rank value in multiple column combination?
Hi, Someone assist me, how do I get Ranking for multiple columns combination. for example, I have Country, Product and Sales amount columns are available in dataset. I tried the below code and its n...
- 4 years ago
Ranking = RANKX(ALL('SalesData'[Country], 'SalesData'[product]), [SalesAmt])
or
Ranking = RANKX(filter(ALL('SalesData'[Country], 'SalesData'[product]),[Country] =max([Country]) , [SalesAmt])
or create two ranks one on product and one on the country and switch them using isinscope
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
amitchandak
4 years agoSuper User
Ranking = RANKX(ALL('SalesData'[Country], 'SalesData'[product]), [SalesAmt])
or
Ranking = RANKX(filter(ALL('SalesData'[Country], 'SalesData'[product]),[Country] =max([Country]) , [SalesAmt])
or create two ranks one on product and one on the country and switch them using isinscope
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/