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

RANKX Problem

I have been using the following formula with RANKX successfully with various tables, but I'm running into an issues where different values get the same rank with the following report:

 

G - Rank =
VAR temp = SUM ( RANKX_Problem[G] )
RETURN
   IF (
       temp = 0;
       BLANK ();
       RANKX (
                    ALLSELECTED ( RANKX_Problem );
                    CALCULATE (
                                         SUM ( RANKX_Problem[G] )
                                        );
                    ;
                    ;
                    Dense
       )
   )

 

 

Notice 201706 has value G=62 and gets RANK 1 correctly, but so does 201702 with G=44

RANKX_Problem.png

 

Any help appreciated!

 

Thanks,

 

MT

5 REPLIES 5
kentyler Established Member
Established Member

Re: RANKX Problem

You have 11 different  values, but the measure only returns ranks of 1 to 3. What is your intention ?

mturcotte_epq Frequent Visitor
Frequent Visitor

Re: RANKX Problem

I'm sorry, I thought my intention was obvious...

 

I would like "G - Rank" to contain the ranks from 1 to 11 based on the values of G.

 

So G=62 would have G-Rank=1

G=44 would have G-Rank=2

G=37 would have G-Rank=3

...

 

Thanks, MT

 

Community Support Team
Community Support Team

Re: RANKX Problem

Hi @mturcotte_epq ,

 

I created a similar file as yours but I don't have these issues. You could get slicer by creating an independent table. Could you share your files?

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mturcotte_epq Frequent Visitor
Frequent Visitor

Re: RANKX Problem

Ok I managed to post the file on my One Drive:

 

https://1drv.ms/u/s!ArclD4PLnaKAnxHB4m7EAzuthu6e?e=QWP7ft

 

Please let me know what I might have overlooked that could explain this unintended behavior for RANKX.

 

Thanks, MT

 

mturcotte_epq Frequent Visitor
Frequent Visitor

Re: RANKX Problem

Actually, please disregard the link posted in my last message as it appears to be a corrupted version of the report I created to illustrate the problem.

 

Instead, please use this link below to a ZIP file containing the report:

 

https://1drv.ms/u/s!ArclD4PLnaKAnxKraQDXUakCrlEb?e=7fa5lx

 

I created a few columns that also exhibit the unintended behavior of RANKX for non-zero values in columns.

 

Once again, any help appreciated.

 

Thanks, MT

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 353 members 3,249 guests
Please welcome our newest community members: