Forum Discussion

left4pie2's avatar
left4pie2
Helper I
3 years ago
Solved

RANKX

I'm struggling to figure out how to properly use RankX.   Here is a test table I created with names and points. I'd like to sum the total points for each name and then rank them.   ...
  • lukiz84's avatar
    3 years ago

    Hi,

     

    create a measure

     

     

     

    SumOfPoints = SUM(TestTable[Points])

     

     

     

    and change your rank

     

     

     

    Rank = RANKX(ALL(TestTable[Name]), [SumOfPoints])

     

     

     

    Please see RANKX – DAX Guide for more information, the part why i use an extra measure:

     

    The Expression argument is evaluated in a row context: while a measure reference implies a context transition, an explicit CALCULATE might be necessary using aggregation functions such as SUM.