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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.