cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DPJay Frequent Visitor
Frequent Visitor

Ranking

location ranking.jpg

Hello,

 

I am trying to rank locations using RankX function based on quantity for each location. I'm not sure why I'm getting the same rank for multiple locations although the quantity is different.

Can anyone help me on this?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sean Super Contributor
Super Contributor

Re: Ranking

Add the column you are Ranking I couldn't see the name in your picture above.

 

Rank Measure =
IF (
    HASONEVALUE ( FINAL_TBL[Column you are Ranking] ),
    RANKX ( ALL ( FINAL_TBL[Column you are Ranking] ), [TOT_QTY] )
)

View solution in original post

6 REPLIES 6
Sean Super Contributor
Super Contributor

Re: Ranking

Can you post the formulas for the RANK Measure and the TOT_QTY?

DPJay Frequent Visitor
Frequent Visitor

Re: Ranking

rank.jpgtot_qty.jpg

Sean Super Contributor
Super Contributor

Re: Ranking

Add the column you are Ranking I couldn't see the name in your picture above.

 

Rank Measure =
IF (
    HASONEVALUE ( FINAL_TBL[Column you are Ranking] ),
    RANKX ( ALL ( FINAL_TBL[Column you are Ranking] ), [TOT_QTY] )
)

View solution in original post

DPJay Frequent Visitor
Frequent Visitor

Re: Ranking

Hi Sean,

 

Thanks a lot..it worked Smiley Happy

Sean Super Contributor
Super Contributor

Re: Ranking

Great! Smiley Happy
I added IF ( HASONEVALUE (...) to get rid of the 1 in the Total Row at the bottom of the Visual

tekinbk Frequent Visitor
Frequent Visitor

Re: Ranking

Hello everyone,

I am trying to rank my table records in order to standard deviation of a column. The following SS shows how is my generic approach is wrtitten to achieve the rankings and I did the same for median values for the same column and it worked without any problem. So, here is how my function looks like:

 

2019-08-20_14h04_46.png

This returns me 1 as the rank of each record. However when I change STDEV.P to MEDIAN it works pretty well

2019-08-20_14h14_49.png

For more clearance, I am adding indices devided by a big number to prevent having the same rank for same values. That's why you see a sum there.

So, could anyone help me out and explain what is the problem here or how to create a stable ranking function for my tables please?

Thanks in advance,

Cheers!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 190 members 2,687 guests
Please welcome our newest community members: