Forum Discussion
RANKX Issues - Beginner woes
Hoping to get some help here with RANKX. I have scoured the boards and tried almost all suggestions to no avail trying to get RANKX to work properly. Below is my scenario.
1. created a measure 'Total Sales' [
2. Applied RANKX to the total sales measure to rank it by value and the image below is what i get which is obviously wrong. [
] I am at a loss of what is going wrong here. TAll fields are in the same table.
9 Replies
- kentyler
Solution Sage
So, looking at the total sales measure... each item has multiple invoices...and your summing them up ?
- AnonymousNot applicable
correct!
- amitchandak
Super User
Are you looking to rank only sales? Please refer these three articles
Refer
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-3-of-3-the-finale
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin- AnonymousNot applicable
Thank you. I will review the articles in hopes to shed some light.
- AnonymousNot applicable
I was able to go through the articles and I decided to try sample data that I generated. I am still getting the same issues. I have included the pbix file i am using in hopes anyone can help glean anything wrong that I am doing. Any assistance will be appreciated.
Thank you.
- v-lid-msft
Community Support
Hi Anonymous ,
We can try to use the following measures to meet your requirement:
Rank_SUM = RANKX(ALLSELECTED(RankingTest), [TotalSales_SUM],,ASC,Dense)Rank_SUMX = RANKX(ALLSELECTED(RankingTest), [TotalSales_SUMX],,ASC,Dense)Rank_CASUM = RANKX(ALLSELECTED(RankingTest), [TotalSales_CASUM],,ASC,Dense)Rank_CASUMX = RANKX(ALLSELECTED(RankingTest), [TotalSales_CASUMX],,ASC,Dense)If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that you have shared.
Best regards,