cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Rank does not work

Hey Guys, 

 

I have created a Rank function with a Top/Bottom filter. It's working, but it is acting kinda weird. Please see the attached image does anybody know why is that or what's wrong? It's showing the same rank even though they are not the same numbers that we rank by. 

 

Equation - 

Rank = IF(
                    HASONEVALUE('Top/Bottom'[Order]),
                        SWITCH(
                            VALUES('Top/Bottom'[Order]),
                            "Top 10", RANKX(ALL(Store_dim[StoreName]),[GP per Customer],,DESC,Dense),
                           RANKX(ALL(Store_dim[StoreName]),[GP per Customer],,ASC,Dense)
                        ))

Ranks.JPG

This is a very large file. I try to upload a sample file but it did not work. Sorry about that. 

 

One more thing, when I filter by Rank is less than 16, that is when my chart get weird Filter.JPG

 

 

Thank you so much 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Rank does not work

Hi @Anonymous,

 

Please modify the formula to below for a test.

Rank = IF(
                    HASONEVALUE('Top/Bottom'[Order]),
                        SWITCH(
                            VALUES('Top/Bottom'[Order]),
                            "Top 10", RANKX(ALLSELECTED(Store_dim),[GP per Customer],,DESC,Dense),
                           RANKX(ALLSELECTED(Store_dim),[GP per Customer],,ASC,Dense)
                        ))

 

Regards,
Yuliana Gu

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

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: Rank does not work

Hi @Anonymous,

 

Please modify the formula to below for a test.

Rank = IF(
                    HASONEVALUE('Top/Bottom'[Order]),
                        SWITCH(
                            VALUES('Top/Bottom'[Order]),
                            "Top 10", RANKX(ALLSELECTED(Store_dim),[GP per Customer],,DESC,Dense),
                           RANKX(ALLSELECTED(Store_dim),[GP per Customer],,ASC,Dense)
                        ))

 

Regards,
Yuliana Gu

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

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Rank does not work

@v-yulgu-msft

 

Thank you for the help. This is working. I appreciate your time. 

Helpful resources

Announcements
Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors