cancel
Showing results for
Did you mean:
Highlighted
Helper III

## 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.

Right now, I can only produce this code :

Rank = RANKX(ALL(ALLplayers);ALLplayers[Salary])

Player                 Team              Rank            Salary

 Player1 Team1 1 8 384 000  \$ Player2 Team1 2 5 704 000  \$ Player3 Team1 3 5 618 000  \$ Player4 Team1 4 4 756 000  \$ Player5 Team1 5 4 384 000  \$ Player6 Team1 6 4 356 000  \$ Player7 Team1 7 4 160 000  \$ Player8 Team1 8 4 057 000  \$ Player9 Team2 1 8 384 000  \$ Player10 Team2 2 5 704 000  \$ Player11 Team2 3 5 618 000  \$ Player12 Team2 4 4 756 000  \$ Player13 Team2 5 4 384 000  \$ Player14 Team2 6 4 356 000  \$ Player15 Team2 7 4 160 000  \$ Player16 Team3 8 4 057 000  \$ Player17 Team3 1 8 384 000  \$ Player18 Team3 2 5 704 000  \$ Player19 Team3 3 5 618 000  \$ Player20 Team3 4 4 756 000  \$ Player21 Team3 5 4 384 000  \$ Player22 Team3 6 4 356 000  \$ Player23 Team3 7 4 160 000  \$ Player24 Team3 8 4 057 000  \$
13 REPLIES 13
Highlighted
Helper III

I can't change it much.

Highlighted
Helper III

Here's the link to my pbix file.

Highlighted
Solution Supplier

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 )

Highlighted
Helper III

That is weird... I really don't know what's the problem... (sigh)

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Microsoft Power Platform Communities

Check out the Winners!

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors