Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Rankx with if statement not working

I am trying to rank the people based on the total calls they are getting. 

I first created a total calls measure and then a rank measure. Finally i am trying to create a calculated column to show if the people's rank is top 30 or not. However, after using the if statement, some of the outputs are not correct.

here are the codes:

FE Rank =RANKX(ALLSELECTED('FE Territory'), [FE Total Calls],,DESC,Dense)
Top30 =IF('FE Territory'[FE Rank] <=30,"Top 30","Under 30")

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Here is an example of the data

      FETotal CallsRank

      Adam

      243
      Brian302
      Chris801
      Drake124
      Eric55