Forum Discussion
Erika_S
5 years agoHelper I
Rankx not working
Hi everyone, Hope maybe you can help? I am trying to build Rankx measure but it keeps coming back with 1 to 66 π This is the dax i tried: Ranking = RANKX(ALLSELECTED('Agent level stats'), CALCUL...
- 5 years ago
Erika_S ,
formulas
Calls = SUM('Table'[Number of Calls Handled])
Rank = rankx(ALLSELECTED('Table'[Agent ID]),[Calls],,DESC,Dense)what it is showing
Erika_S
5 years agoHelper I
Yes, thank you all. Here is the data sample attached.
Here is what i would expect to see. Ranked based on who took the most calls. I woud then hope to introduce another column into the calculation. But want to get the initial one to work π Rank in the table if for illustration, not the actual rank.
| Agent ID | Rank |
| 1 | 5 |
| 2 | 6 |
| 3 | 3 |
| 4 | 2 |
| 5 | 4 |
| 6 | 1 |
Here is the example: (so sorry, i cant see where to attach pbix or worksheet).
| Agent ID | Number of Calls Handled | Total Call Time (secs) |
| 1 | 32 | 0 |
| 2 | 3 | 0 |
| 3 | 6 | 0 |
| 4 | 9 | 0 |
| 4 | 3 | 1864 |
| 4 | 1 | 191 |
| 4 | 9 | 244 |
| 5 | 1 | 98 |
| 5 | 14 | 2966 |
| 5 | 14 | 2974 |
| 5 | 14 | 3283 |
| 5 | 15 | 2916 |
| 5 | 36 | 8908 |
| 5 | 37 | 6354 |
| 5 | 46 | 10908 |
| 5 | 71 | 14398 |
| 5 | 74 | 9570 |
| 5 | 78 | 17655 |
| 6 | 15 | 4481 |
| 6 | 15 | 5238 |
| 6 | 16 | 2987 |
| 6 | 16 | 3266 |
| 6 | 16 | 3456 |
| 6 | 16 | 3559 |
| 6 | 16 | 3672 |
| 6 | 16 | 3712 |
| 6 | 16 | 3760 |
Anonymous
5 years agoNot applicable
Hi Erika_S ,
Create a measure
No. of Calls handled Measure = SUM('Table'[Number of Calls Handled])
Ranking Measure = RANKX(ALL('Table'[Agent ID]), [No. of Calls handled Measure],,DESC)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
- Erika_S5 years agoHelper I
This almost worked! I have added "Dense" as it was showing the bottom few as all on Rank 20. Dense didnt help though.
Ranking = RANKX(all('Agent level stats'[Agent ID]),[No Calls Handled],,DESC,Dense)thank youuuu!!