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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cjcj
Helper I
Helper I

Ranking on Measure

Hi, I am trying to create ranking based on a measure and gettting unexpected results when adding in additional columns on the date.

Table 1 shows up correctly using the following.  However, on Table 2, I am seeing unexpected results when adding 1 or more additional columns.  Note that "[MoM Change]" is a measure

 

MoM Rank = RANKX(

     allselected('Tbl_CustSales'[Customer Name]),

    [MoM Change]

    ,,DESC

)

 

cjcj_1-1661838735657.png

 

 

would appreciate any thoughts.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@cjcj , When you add any column in visual (not summarized), Rank will readjust inside that one

 

You need measure like

MoM Rank = RANKX(

Summarize(allselected(Fact) , 'Tbl_CustSales'[Customer Name], Location[Location]),

[MoM Change]

,,DESC

)

 

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

 

 

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

 

 

IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@cjcj , When you add any column in visual (not summarized), Rank will readjust inside that one

 

You need measure like

MoM Rank = RANKX(

Summarize(allselected(Fact) , 'Tbl_CustSales'[Customer Name], Location[Location]),

[MoM Change]

,,DESC

)

 

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

 

 

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

 

 

IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM

Hi @amitchandak another follow up question.  Same scenario but if "Location" is from Tbl_2, and [MoM Change] is from Tbl_3, is there a way to modify this measure to get the rank...without creating a summary table?

Thank you!

that worked perfectly!  thank you!!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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