cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular 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
Highlighted
Community Champion
Community Champion

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
Highlighted
Community Champion
Community Champion

Re: Ranking

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

Highlighted
Regular Visitor

Re: Ranking

rank.jpgtot_qty.jpg

Highlighted
Community Champion
Community Champion

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

Highlighted
Regular Visitor

Re: Ranking

Hi Sean,

 

Thanks a lot..it worked Smiley Happy

Highlighted
Community Champion
Community Champion

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

Highlighted
Helper I
Helper I

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
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors