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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ashamsuzzoha
Helper III
Helper III

Help with rankx(); Ties I don't understand the origin of

Hello, I'm trying to run the following simple rankx measure in a table visual.

 

Undergrounding Priority Rank = 

RANKX(
    ALL('tablename'),
    CALCULATE([Undergrounding Priority Score]),
    ,
    ASC
)

 

But placing the measure in the table leads to ties I can't figure the origin from, as show below.

rankx screenshot.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Can someone help me out here? Thanks.

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@ashamsuzzoha ,

Try like, if this can work

 

Undergrounding Priority Rank = 

RANKX(
    ALL('tablename'[Feeder]),
    CALCULATE([Undergrounding Priority Score]),
    ,
    ASC
)

 

For Rank Refer: https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

 

 

View solution in original post

AiolosZhao
Memorable Member
Memorable Member

Hi @ashamsuzzoha ,

 

Please try to use the below measure. It works on my desktop:

 

Measure 15 = RANKX(ALL('Table (4)'[Feeder]),[Your Measure],,ASC)

 

Aiolos Zhao 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
AiolosZhao
Memorable Member
Memorable Member

Hi @ashamsuzzoha ,

 

Please try to use the below measure. It works on my desktop:

 

Measure 15 = RANKX(ALL('Table (4)'[Feeder]),[Your Measure],,ASC)

 

Aiolos Zhao 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@ashamsuzzoha ,

Try like, if this can work

 

Undergrounding Priority Rank = 

RANKX(
    ALL('tablename'[Feeder]),
    CALCULATE([Undergrounding Priority Score]),
    ,
    ASC
)

 

For Rank Refer: https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

 

 

@AiolosZhao @amitchandak Thank you, but that does not seem to have helped.

 

Now all the ranks are 1.

 

Screenshot 2020-09-14 230111.png

Hi @ashamsuzzoha ,

 

1. Is Feeder a normal column?

2. Could you please show me the measure of Undergrounding Priority Score?

3. If these columns are not in one table, could you please show me the data model?

 

Thanks.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@AiolosZhao @amitchandak 

 

The Priority Score measure is a weighting of individual rankx measures on columns on my table, as follows:

Undergrounding Priority Score = 

[rank_column A] * weight A + 
[rank_column B] * weight B + 
[rank_column C] * weight C + 
[rank_column D] * weight D + 
[rank_column E] * weight E + 
[rank_column F] * weight F + 
[rank_column G] * weight G

where the sum of weights is 1

so I had to correct the individual rank measures with the code you suggest, and it worked.Screenshot 2020-09-15 153537.png

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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