Forum Discussion
Rank based on measure
Hello,
I have an issue with my PBI model where I'm trying to rank people based on a measure. I have calculated rank using RANK function. However, rankings do not change when I toggle between years using a slicer. It always shows the same rank (which is computed for all years) regardless of which year I select in the slicer. PBI Model here.
Can someone help me how to dyanmically rank based on a measure?
Thanks in advance,
AM
Thanks for the replies!
I was fumbling with RANKX for nearly a day and then stumbled upon RANK by accident (here in this forum) and it worked by accident and I didn't even realize it.
Rank Measure = RANK(DENSE,ALL(Names),ORDERBY([Measure],DESC),,)Appreciate your time!
6 Replies
- amani1980Frequent Visitor
Thanks for the replies!
I was fumbling with RANKX for nearly a day and then stumbled upon RANK by accident (here in this forum) and it worked by accident and I didn't even realize it.
Rank Measure = RANK(DENSE,ALL(Names),ORDERBY([Measure],DESC),,)Appreciate your time!
- AnonymousNot applicable
- Bibiano_Geraldo
Super User
Hi amani1980 ,
Based on your .pbix, your measure is working perfectly, as you can see in your table, when change the selection in the slicer the names are rearranged based on your Rank measure.
- ribisht17
Super User
HI amani1980
Are you sure ?It works as expected,
Here is my video on Power BI rank function https://youtu.be/IlB3Ezlrmro
Regards,
Ritesh
Please mark the answer if it is helpful so that it can help others as well - lbendlin
Super User