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
Qotsa
Helper V
Helper V

Rankx - If tied then rank using another measure

Hi,

 

This measure ranks [Location] based on [Score]->

Rank = RANKX(ALL(Query1[Location]),[Score],,ASC,Dense)

 

For ties, I need to rank on a second measure [Avg Last 8 Wks Offered]

 

I have below measure that returns no errors but a 'not enough memory to complete' error message appears.

 

Rank = RANKX(ALL('Query1'),
RANKX (ALL('Query1'[Location]), 'Query1'[Score])
+ DIVIDE(
RANKX(ALL('Query1'), 'Query1'[Avg Last 8 Wks Offered]),
(COUNTROWS(ALL('Query1')) + 1)
)
, ,ASC )
1 ACCEPTED SOLUTION

@Qotsa 

If this is solved please mark this as solution Thanks!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


View solution in original post

4 REPLIES 4
Qotsa
Helper V
Helper V

@VijayP 

 

Got it working with -

 

Rank = RANKX(ALL('Query1'[Location]),
RANKX (ALL('Query1'[Location]), 'Query1'[Score])
+
RANKX(ALL('Query1'), 'Query1'[Avg Last 8 Wks Offered]) /
(COUNTROWS(ALL('Query1')) + 1)

, ,ASC )
 
Thks for your input on this.

 

@Qotsa 

If this is solved please mark this as solution Thanks!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Qotsa
Helper V
Helper V

Wasn't sure on the parenthesis to add so I removed divide and used / instead.

Still getting same memory error message.

 

Rank = RANKX(ALL('Query1'),
RANKX (ALL('Query1'[Location]), 'Query1'[Score])
+
RANKX(ALL('Query1'), 'Query1'[Avg Last 8 Wks Offered]) /
(COUNTROWS(ALL('Query1')) + 1)

, ,ASC )
VijayP
Super User
Super User

@Qotsa 

Check the Parenthesis with Divide function , the last Parenthesi is missing i think!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


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.