Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am new to Power BI and I am hoping I can get some help with ranking issue. Thanks in advance for all your help with this question.
I have a table that contain supplier score by category and measurement. I need to rank the supplier by the total score for the period. The score is break down by Category and Measurement.
I tried the with RANKX as follow:
If I bring in the Category and the Measures into the table, my ranking is now no longer by supplier, but by Measurement as shown below. How do I apply the filter so no mater how I slide the data table, it will give me the correct ranking by supplier as shown above.
Solved! Go to Solution.
Hi @jochungJE ,
For your requirement, please refer to the formulas below.
Measure = COUNTROWS ( FILTER ( ALL ( new ), ISONORAFTER ( new[sum of score], SELECTEDVALUE ( new[sum of score] ), DESC, new[Supplier], SELECTEDVALUE ( new[Supplier] ), DESC ) ) ) Measure 2 = RANKX(ALL(new),[Measure],,DESC,Dense)
Here is the output.
More details, please refer to my attachment.
Best Regards,
Cherry
Hi @jochungJE ,
Please try this measure below.
Ranking = RANKX ( ALLSELECTED ( 'Table'[Supplier], 'Table'[Category], 'Table'[Measurement] ), CALCULATE ( SUM ( 'Table'[Score] ) ), , DESC, DENSE )
Here is my test output.
If you still need help, please share your desired output.
Best Regards,
Cherry
Hi Cherry,
See below for the desired output, I am not able to replicate this in Power BI.
The raking is for the total score of the Supplier for the Period and Group, disregard the category and measurement.
Thanks in advance.
Hi @jochungJE ,
For your requirement, please refer to the formulas below.
Measure = COUNTROWS ( FILTER ( ALL ( new ), ISONORAFTER ( new[sum of score], SELECTEDVALUE ( new[sum of score] ), DESC, new[Supplier], SELECTEDVALUE ( new[Supplier] ), DESC ) ) ) Measure 2 = RANKX(ALL(new),[Measure],,DESC,Dense)
Here is the output.
More details, please refer to my attachment.
Best Regards,
Cherry
Thank you @v-piga-msft ,
I need to modify both the Measure and Measure2 to include Period Key in the 'filter grouping'. Once I apply the new condition, the ranking is exactly what I needed.
Thank you so much for your support.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |