cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
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])
 
Anyone can help me please?

 

 Player                 Team              Rank            Salary 

Player1Team11    8 384 000  $
Player2Team12    5 704 000  $
Player3Team13    5 618 000  $
Player4Team14    4 756 000  $
Player5Team15    4 384 000  $
Player6Team16    4 356 000  $
Player7Team17    4 160 000  $
Player8Team18    4 057 000  $
Player9Team21    8 384 000  $
Player10Team22    5 704 000  $
Player11Team23    5 618 000  $
Player12Team24    4 756 000  $
Player13Team25    4 384 000  $
Player14Team26    4 356 000  $
Player15Team27    4 160 000  $
Player16Team38    4 057 000  $
Player17Team31    8 384 000  $
Player18Team32    5 704 000  $
Player19Team33    5 618 000  $
Player20Team34    4 756 000  $
Player21Team35    4 384 000  $
Player22Team36    4 356 000  $
Player23Team37    4 160 000  $
Player24Team38    4 057 000  $
13 REPLIES 13
Highlighted

I can't change it much.

 

Sans titre.png

Highlighted

Here's the link to my pbix file.

Highlighted

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 )
 
result.PNG

View solution in original post

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors