Forum Discussion
DAX Calculated Table - Ordered Rank
I know there are similar posts out there, but after hours of googling, I couldn't find one that fit exactly what I've been trying to do and failing time and time again at. I originally posted this question as a reply on a closed topic, so I've started a new one.
Is there a way to do a rank but have ties come out 1, 2, 3 instead of 1, 1, 3? It's a calculated table so I cant use Power Query. I've been googling and trying different things for hours with no solution.
| Reason | # Cases | Using RankX | What I want |
| Lorem | 34 | 1 | 1 |
| ipsum | 34 | 1 | 2 |
| dolor | 18 | 3 | 3 |
| amet | 5 | 4 | 4 |
| consectetuer | 5 | 4 | 5 |
| adipiscing | 5 | 4 | 6 |
| Maecenas | 2 | 7 | 7 |
| porttitor | 1 | 8 | 8 |
Maybe if I say why I want this, there's an alternate solution I'm not thinking of:
I need to display the Top 5 Reasons in a page:
Reason Lorem # Cases: 34 | Reason ipsum # Cases: 34 | Reason dolor # Cases: 18 | Reason amet # Cases: 5 | Reason consectetuer # Cases: 5 |
I realize that one of the ones that are 5 gets cut off arbitrarily, but its ok.
Any ideas?
Originally I did create this table using Power Query and an Index column, but the report kept throwing weird errors in the Service so I've had to go to a calculated table.
3 Replies
- Ashish_MathurSuper User
- AnonymousNot applicable
Thank you! This is working exactly how I need it to! Brilliant!! Ashish_Mathur
- Ashish_MathurSuper User
You are welcome.