cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashamsuzzoha
Helper II
Helper II

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 IV
Super User IV

@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

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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!




View solution in original post

amitchandak
Super User IV
Super User IV

@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

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

@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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.