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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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

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

 

 



Microsoft MVP



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.




LinkedInVisit my LinkedIn page




Outlook BookingSchedule 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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.