Forum Discussion
Reverse Ranking DAX or Measure
- 4 years ago
Is the Operator column shown the same one you put in the ALLSELECTED? Is that column sorted by another column? Do you have multiple tables in your model? If so, what are the relationships between them?
Pat
Please try this measure expression in a table visual without your Date column (you mentioned using date filters over a bigger date range). Just replace T1 with your actual table name.
ReverseRank =
RANKX( ALLSELECTED( T1[Name] ), CALCULATE( SUM( T1[Time (s)] ) ),, ASC )
Pat
Hi mahoneypat !
Thank you so much for your quick response!
Your DAX did get me some results. I am seeing that the ranking does not change with selection.
I guess, I need to provide more context. My bad.
During any shift, I can have anywhere between 9-12 operators working. So, based on the timeframe, I would see multiple instances of the same operator. The time field is capturing the time it takes them to complete an action. For example, in one shift I may have 10 operators working. They are performing the same action repeatedly - which is picking an item, scanning it, and placing it in a bin. They maybe picking around 5,000 items. So during one shift, I may have around 50,000 datapoints of time. What I want to achieve is that depending on the timeframe selected, I want to rank the performance of each operator from 1 to total number of operators working during that timeframe.
The result I am seeing ranks each action by an operator, I guess. I see the rankings in 32,000 range. I am not able to see the ranks from 1 to N. Please see the screenshot below:
If I add "Dense" at the end of your measure, the rankings change to 700 series.
Can you please advise?
Thank you!