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 All,
I have a measure to rank staffs based on sales as follows :
https://drive.google.com/file/d/1R2HPsre1Jw56frrbuuwEG9TH2r72h3sn/view?usp=sharing
Thanks in advance
Solved! Go to Solution.
Hi @Jos13 ,
The Rank is working correctly, the users with no sales are ranked last, makes sense to me. what you need to do is exclude them from the rank function
like so
Rank_Sales = if(sum('Table'[Sales]) <> BLANK(), RANKX(ALLSELECTED('Table'[Staff]),[Sales_],,DESC), BLANK())
Hope this Helps
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Proud to be a Super User!
Hi @Jos13 ,
The Rank is working correctly, the users with no sales are ranked last, makes sense to me. what you need to do is exclude them from the rank function
like so
Rank_Sales = if(sum('Table'[Sales]) <> BLANK(), RANKX(ALLSELECTED('Table'[Staff]),[Sales_],,DESC), BLANK())
Hope this Helps
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Proud to be a Super User!
@Jos13 ,
Try mutiple columns, example
City and ID Rank = RANKX(all(Geography[City],Geography[City Id]),[Sales])
City and ID Rank = RANKX(allselected(Geography[City],Geography[City Id]),[Sales])
For Rank, Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
@Jos13 - See this article, it may help. https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |