Forum Discussion
Dynamic ranking by sorted column
Hello!
Let's say I've such table visual which is ranked by Volumes according formula Rank = RANKX(ALL(Organisations[Organisation]);[Volumes];;DESC;Dense)
For example I want to sort Revenue column from largest to smallest value and rank it accordingly. How can I do it?
p.s. Volumes/Revenue/CM are measures.
| Rank | Organisation | Volumes | Revenue | CM |
| 1 | Company13 | 44 | 3.020 € | 218 € |
| 2 | Company3 | 42 | 1.245 € | 320 € |
| 3 | Company11 | 36 | 3.193 € | 111 € |
| 4 | Company6 | 30 | 3.574 € | 474 € |
| 5 | Company10 | 25 | 4.685 € | 242 € |
| 6 | Company8 | 23 | 1.161 € | 424 € |
| 7 | Company14 | 22 | 2.220 € | 166 € |
| 8 | Company4 | 21 | 2.089 € | 162 € |
| 9 | Company9 | 21 | 2.461 € | 289 € |
| 10 | Company2 | 19 | 3.597 € | 308 € |
| 11 | Company1 | 13 | 4.468 € | 358 € |
| 12 | Company5 | 13 | 1.199 € | 391 € |
| 13 | Company12 | 13 | 4.454 € | 263 € |
| 14 | Company7 | 2 | 1.883 € | 130 € |
- Anonymous8 years ago
Thanks TomMartens. I solved my problem following this post: https://community.powerbi.com/t5/Desktop/Rank-a-column-in-a-table-based-on-slicer-selection/td-p/77705
Tomas
2 Replies
- TomMartensSuper User
Hey,
I'm wondering if I understand correctly, but why not create just another measure like so:Rank Revenue= RANKX(ALL(Organisations[Organisation]);[Revenue];;DESC;Dense)
Regards,
Tom
- AnonymousNot applicable
Thanks TomMartens. I solved my problem following this post: https://community.powerbi.com/t5/Desktop/Rank-a-column-in-a-table-based-on-slicer-selection/td-p/77705
Tomas