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)
Try excluding from visual
amitchandak I tried but suppose if ranking is 1 for that name then my ranking is showing from 2 only..
- Vish246 years ago
Helper II
amitchandakthis ranking is working fine in table but when I am showing it in a card after selecting a name its not coming corrcetly. Could you please suggest me any solution for that.I have list of around 300 names and I am keeping them in slicer. So I have two slicer for name and year. And I am showing total sales and rank after selecting the slicer. Its not giving correct values for ranks.