Forum Discussion
RexaZii93
Helper I
4 years agoHow to create ranking for highest value to lowest
Hi I want to create a rank by highest value, for example if I have this table: Routes: Total Pax No.: RUH 10,000 JED 6,000 RUH 15,000 ABH 9,000 JED 7,000 I want...
- 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.
RexaZii93
Helper I
4 years agoThanks, 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
Shishir22
Solution Sage
4 years agoIn 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.