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 Team,
I have 2 measures to rank categories and products based on sales.
Solved! Go to Solution.
Hi @Jos13 ,
Have a look at this video to understand the difference between ALL() and ALLSELCTED() when used with RANKX.
https://www.youtube.com/watch?v=z2qzJVeYhTY
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
@Jos13 ,
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...
Try like
Category_Rank_All_Column = RANKX(ALLselected(Categories[CategoryName]),[Total Sales],,DESC)
Hi,
I had tried ALLSELECTED(). I just wanted to know why ALL() function gives different results.
Thanks,
Jos
Hi @Jos13 ,
Have a look at this video to understand the difference between ALL() and ALLSELCTED() when used with RANKX.
https://www.youtube.com/watch?v=z2qzJVeYhTY
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
@Jos13 , Not sure from whom this question.
But All means remove the filter of that particular column, take all values, All selected to take selected values
Refer these fore more details
https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/
Hi,
Does this work?
=Category_Rank_All_Column = RANKX(ALLSELECTED(Categories[CategoryName]),[Total Sales],,DESC)
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 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |