Forum Discussion
RANKX Column/ Measure - Rank to change dynamically when filter
Hi,
I am trying to derive dynamic rank for each department by count of department which should generate rank when filters are applied (Company Cluster, Type, Code). The summaized data looks like this,
| Dept | Rank | Asset Class 1 | Asset Class 2 | Asset Class 3 | Asset Class 4 | Asset Class 5 | Grand Total |
| Dept 7 | 1 | 44 | 65 | 94 | 131 | 334 | |
| Dept 11 | 2 | 84 | 18 | 60 | 58 | 220 | |
| Dept 12 | 3 | 48 | 31 | 79 | 56 | 214 | |
| Dept 4 | 4 | 78 | 34 | 57 | 32 | 201 | |
| Dept 2 | 5 | 64 | 87 | 34 | 15 | 200 | |
| Dept 3 | 6 | 79 | 21 | 46 | 32 | 178 | |
| Dept 9 | 7 | 35 | 87 | 14 | 34 | 170 | |
| Dept 8 | 8 | 58 | 12 | 48 | 32 | 150 | |
| Dept 1 | 9 | 41 | 12 | 35 | 46 | 11 | 145 |
| Dept 5 | 10 | 23 | 54 | 46 | 13 | 8 | 144 |
| Dept 10 | 11 | 40 | 17 | 63 | 22 | 142 | |
| Dept 6 | 12 | 29 | 19 | 34 | 39 | 121 |
I used both Measure and Column
Measure =
2 Replies
- parry2k
Super User
Anonymous check these posts on Rank
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finaleI 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!
- AnonymousNot applicable
Hi parry2k , thanks for sharing the references, but I want to get the department that is ranked first, second up-to fourth rank as I wish to filter those departments for creating other charts.
Thanks..