Forum Discussion
How to create ranking for highest value to lowest
- 4 years ago
Hello RexaZii93 ,
Try creating below calculated column-
Rank = RANKX ( 'Table', CALCULATE ( SUM ( 'Table'[Total Pax No.] ), FILTER ( 'Table', 'Table'[Routes] = EARLIER ( 'Table'[Routes] ) ) ), , DESC, DENSE )Please mark it as solution if it solves your issue. Kudos are also appreciated.
Thanks, it worked! but I have a column which filter internations and domestic routs and another one which filters departure and arrival, when I apply it show the rank of international for example it miss up the rank and goes 7 10 30 etc.
can I make the rank dynamicly to when I apply filters.
Thanks
In that case, you need to go for Measure in place of calculated column.
Create measure -
TotalPaxMeasure = Sum('Table'[Total Pax No.])
Create one more measure after creating above one and then use it for ranking.
RankMeasure =
CALCULATE (
RANKX ( ALLSELECTED ( 'Table'[Routes] ), [TotalPaxMeasure],, DESC, DENSE )
)
Please mark it as answer if it resolves your issue. kudos are also appreciated.
- RexaZii934 years ago
Helper I
Thanks I added the 2 measures but how does work? do I just add the pax no. and the rank measures to the filtering option?
- Shishir224 years ago
Solution Sage
Just use rank measure as visual level filter and set to equal to 1.
- RexaZii934 years ago
Helper I
Thanks I tested to a list visual and it worked I can just change the number to any rank and it shows the data I want, but when I use a card visual and applied the measure it grays out do you know why is that and how to fix it?