Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Alta88
Helper IV
Helper IV

Rank Teams using RANKX

How do you rank teams using the RANKX formula? The one we're using keeps returning a value of '1'. We have two teams in the department we're ranking (Strategic Ops and Quick Strike). The individual reps have been ranked, but the teams aren't following suit: 

 

Alta88_0-1659383417474.png

Our formula is the following: 

Rank Team = RANKX(ALL('Merge1'[Teams]),CALCULATE(DISTINCTCOUNT('Merge1'[Teams])))
1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Alta88 ,

 

Please try this code to do this:

RankTeam = RANKX('Table',[Rank Rep],,ASC)
 
Result:
vchenwuzmsft_0-1659604539104.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @Alta88 ,

 

Please try this code to do this:

RankTeam = RANKX('Table',[Rank Rep],,ASC)
 
Result:
vchenwuzmsft_0-1659604539104.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Alta88
Helper IV
Helper IV

The expected result is to rank each team in ascending order based on how individual reps' rankings. Right now it returns only a value of '1'. One of the two teams will rank higher than the other per the Reps in each. Here's another version of the data: 

 

TeamsRank RepRank Team
Strategic Ops181
Strategic Ops201
Strategic Ops611
Strategic Ops701
Quick Strike701
Strategic Ops301
Strategic Ops191
Strategic Ops151
Strategic Ops141
Strategic Ops331
Strategic Ops431
Strategic Ops81
Strategic Ops691
Quick Strike201
Strategic Ops901
Quick Strike981
Quick Strike331
Strategic Ops191
Strategic Ops151
Quick Strike721
TomMartens
Super User
Super User

Hey,

 

what is the expected result based on the sample data you provided? Not to mention, that a picture can not be easily used to recreate the data to try something. I will not spend time on using screen reader to extract the data from pictures, sorry.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.