Forum Discussion
left4pie2
3 years agoHelper I
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. ...
- 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.
lukiz84
3 years agoMemorable Member
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.