Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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].
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 Forum
Best Regards,
Gao
Community Support Team
If 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
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/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Hi, No it still didnt work. Dont know how did you get this. but I am not able to get it.
Hi @Anonymous ,
Is this one a measure or a calculated column?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
it is a measure
Hi, I dont know how the digits have got shifted. Its Actually |Manager 1| |94.87%|
|Manager 2|| |94.79%|
and so on....
User | Count |
---|---|
93 | |
85 | |
76 | |
66 | |
62 |
User | Count |
---|---|
110 | |
96 | |
95 | |
64 | |
57 |