Forum Discussion
Need help with ranking
- 6 years ago
Hi Vish24 ,
You can use a measure like this:
Measure = VAR _tmpTable = SUMMARIZE(ALLSELECTED(Table1), Table1[Name], "SalesTotal", SUM(Table1[Sales ])) VAR _rankedTable = ADDCOLUMNS(_tmpTable, "Rank", RANKX(_tmpTable, [SalesTotal], , DESC, Dense)) RETURN MAXX(FILTER(_rankedTable, [Name] = SELECTEDVALUE(Table1[Name])), [Rank])Resulting in a visual like this:
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
- 6 years ago
Check
https://www.dropbox.com/s/ps1475oidzubmud/yearsalesemployerank.pbix?dl=0
I think category rank will do
Rank = RANKX(ALL(yearsalesemployerank[Name]),CALCULATE(SUM(yearsalesemployerank[Sales])),,DESC,Skip)
Refer
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
Check for "Ranking by Sub Category"
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
- Vish246 years ago
Helper II
Thank you! I am looking into it and will confirm if I would be able to do my ranking.
- amitchandak6 years ago
Super User
Check
https://www.dropbox.com/s/ps1475oidzubmud/yearsalesemployerank.pbix?dl=0
I think category rank will do
Rank = RANKX(ALL(yearsalesemployerank[Name]),CALCULATE(SUM(yearsalesemployerank[Sales])),,DESC,Skip)- Vish246 years ago
Helper II
amitchandakThank you so much! Its working exactly I want. Just need one last help..I need to exclude one name from the Names List for the ranking. I am trying AllExcept but then my ranking is not working correctly. Please let me know the syntax to exclude one name from my list.
Thank you!