Forum Discussion
CarlsBerg999
Helper V
5 years agoRanking a category (calculated column)
Hi, i have a pretty simple ranking issue im unable to resolve.
In an example table i have 4 rows and 2 columns.
A - 5
A - 7
B - 13
B - 4
I want rank these categories (A and B). How do i rank them from 1 to 2 rather than from 1 to 4? The result should be B = 1 and A = 2.
Thanks!
is this what you want?
Column = RANKX(ALL('Table (2)'),CALCULATE(SUM('Table (2)'[VALUE]),ALLEXCEPT('Table (2)','Table (2)'[ID])),,DESC,Dense)
3 Replies
- ryan_mayu
Super User
is this what you want?
Column = RANKX(ALL('Table (2)'),CALCULATE(SUM('Table (2)'[VALUE]),ALLEXCEPT('Table (2)','Table (2)'[ID])),,DESC,Dense) - Jihwan_Kim
Super User
Ranking measure : =
RANKX ( ALL ( Categories ), CALCULATE ( SUM ( Data[value] ) ),, DESC ) - Ashish_Mathur
Super User
Hi,
The ranking should typically done in a measure. Why do you want it as a column?