Forum Discussion

NumeroENAP's avatar
NumeroENAP
Icon for Helper III rankHelper III
7 years ago
Solved

RANKX with TOPN struggle

Hi,    I want to reproduce the Excel sheet of below, but I struggle a lot when it comes to repeat the rank everytime the team changes. I think I have to mix RANKX with TOPN, but I'm unable to.   ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi,

    Create 2 measures as below and then drag them into the table.

    Total Salary = SUM( Data[Salary] )
    Rank = RANKX( ALLEXCEPT(Data,Data[Team]), [Total Salary], , DESC).
     
    This is what i got on test data.
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi,

    I did the same thing and it works for me.

    Total Salary = SUM( ALLplayers[Salary] )
    Rank = RANKX( ALLEXCEPT( ALLplayers, ALLplayers[Team] ),[Total Salary],,DESC )