Forum Discussion
Rank Percentage in Power BI
Hi,
I have a question regarding the ranking of Percentage. I have the following table:
| Goods | Manager | Percentage |
| Bed | Manager 1 | 94.87% |
| Table | Manager 2 | 94.79% |
| Table | Manager 3 | 82% |
| Chair | Manager 1 | 79% |
I need another column showing the rankings. In the sense, it should look like the following:
| Goods | Manager | Percentage | Ranking |
| Bed | Manager 1 | 94.87% | 1 |
| Table | Manager 2 | 94.79% | 2 |
| Table | Manager 3 | 82% | 3 |
I tried my best, but nothing was just happening. It shows all rankings as "1". I calculated the percentages with the help of a measure. The measure is: Percentage = 'Main Data'[Net Sales]/[Gross Sales].
6 Replies
- AnonymousNot applicable
Hi, I dont know how the digits have got shifted. Its Actually |Manager 1| |94.87%|
|Manager 2|| |94.79%|
and so on....
- tackytechtomMost Valuable Professional
Hi Anonymous ,
How about this:
Here the DAX for the ranking measure.
RankingMeasure = RANKX( ALLSELECTED ( 'Main Data' ), [PercentageMeasure], , DESC , DENSE )I took the snippet from here.
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- AnonymousNot applicable
Hi, No it still didnt work. Dont know how did you get this. but I am not able to get it.
- tackytechtomMost Valuable Professional
Hi Anonymous ,
Is this one a measure or a calculated column?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
- AnonymousNot applicable
Hi Anonymous ,
Please try like this:Ranking = RANKX(SUMMARIZE(ALLSELECTED('Table'),'Table'[Goods],'Table'[Manager]),[Percentage],,ASC,Dense)If this doesn't work, please consider releasing a pbix file without private data, that would be helpful, thanks.
How to provide sample data in the Power BI ForumBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum