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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
kmes912
Helper I
Helper I

RankX two different sets of ranks

I need to be able to rank (and eventually percentile) two comparisons, but display in the same table. Right now the "groupings" and "Name" come from the same lookup attribute table. The score is in the data table. I want to retain the overall ranking but also be able to display the ranking out of the total in that group. 

 

This is what I have currently in the "Rank All", which works but cannot figure out the right combination to get to group
 
Rank = RANKX(ALL('Attributes'),[Score],,DESC,Dense)
 
If I change the Rank to be RANKX(ALL('Attributes'[Names]),[Score],,DESC,Dense), this works if i filter the "groupings" but want to show it live without the need to filter so we can extract the table in one big export. 

 

GroupingsNamesScoreRank AllRank by Group
Group 2Unit 18611
Group 2Unit 28222
Group 3Unit 38131
Group 4Unit 48041
Group 1Unit 57951
Group 1Unit 67961
Group 2Unit 77873
Group 2Unit 87784
Group 1Unit 97593
Group 2Unit 1035105
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kmes912 ,

if you do want filter to change rank

Rank All = RANKX(ALL('Attributes'Groupings ,'Attributes' [Names]),[Score],,DESC,Dense)

 

Rank = RANKX(ALL('Attributes'[Names]),[Score],,DESC,Dense)

 

Work with filter

 

Rank All = RANKX(ALLSELECTED('Attributes'Groupings ,'Attributes' [Names]),[Score],,DESC,Dense)

 

Rank = RANKX(ALLSELECTED('Attributes'[Names]),[Score],,DESC,Dense)

 

Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=25627s

 

 

refer if needed

Power BI Rank Across dimension tables: https://youtu.be/X59qp5gfQoA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1679975700573.png

 

Jihwan_Kim_1-1679976332889.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
amitchandak
Super User
Super User

@kmes912 ,

if you do want filter to change rank

Rank All = RANKX(ALL('Attributes'Groupings ,'Attributes' [Names]),[Score],,DESC,Dense)

 

Rank = RANKX(ALL('Attributes'[Names]),[Score],,DESC,Dense)

 

Work with filter

 

Rank All = RANKX(ALLSELECTED('Attributes'Groupings ,'Attributes' [Names]),[Score],,DESC,Dense)

 

Rank = RANKX(ALLSELECTED('Attributes'[Names]),[Score],,DESC,Dense)

 

Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=25627s

 

 

refer if needed

Power BI Rank Across dimension tables: https://youtu.be/X59qp5gfQoA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.