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.
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.
- RexaZii934 years ago
Helper I
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
- Shishir224 years ago
Solution Sage
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?