Forum Discussion
Anonymous
7 years agoNot applicable
Rank on a Measure
Hello, I am trying to rank a table based on a measure field. In my table I have 'Region' (North, South, East, West), 'Today's Sales', 'Today's Sales Target', and '% of target achieved' (meas...
- 7 years ago
Hi Anonymous ,
If you need to create a measure but not a calculated column for Rank, you can use the DAX below.
Rank = RANKX(FILTER(ALLSELECTED(Table1),Table1[Region]=MAX(Table1[Region])),Table1[% of target achieved],,ASC)Best regards
Amy
Anonymous
7 years agoNot applicable
Hi Amy,
Thanks for the message!
When I use the formula you said I get an error regarding the 'Earlier' part of the equation:
"EARLIER/EARLIEST refers to an earlier row contect which doesn't exist".
I've triple checked I've entered it right!
Any suggestions?
Thanks!
v-xicai
7 years agoCommunity Support
Hi Anonymous ,
If you need to create a measure but not a calculated column for Rank, you can use the DAX below.
Rank = RANKX(FILTER(ALLSELECTED(Table1),Table1[Region]=MAX(Table1[Region])),Table1[% of target achieved],,ASC)
Best regards
Amy