Forum Discussion
WesleyP8
Microsoft Employee
6 years agoMeasure to return top ranked item
Hi all, I'm trying to write a measure to return the highest ranked item, based on counts of rows. This seems like it should be straightforward but I'm struggling. Here's the formula I'm using...
- 6 years ago
See this post, it has both RANKX and non-RANKX ways of doing what you want.
To *Bleep* with RANKX - https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/td-p/1042520
It's probably how you are feeling right now...
Greg_Deckler
Community Champion
6 years agoSee this post, it has both RANKX and non-RANKX ways of doing what you want.
To *Bleep* with RANKX - https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/td-p/1042520
It's probably how you are feeling right now...
parry2k
Super User
6 years agoWesleyP8 try this measure
Rank 1 category = CALCULATE(SELECTEDVALUE(Data[Category],"error"),
FILTER ( VALUES ( Data[Category] ), [Category Rank]=1)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!