Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

rank based on only a single dimension even if it has multiple dimension

Hi Team,

 

I have to below table structure.

Plaform     Tier       Sales     Rank      Required rank
B                BB         2178      1                    1
I                 BB         2207      2                    2
H               CC         2258      3                    3
A               AA         2362      4                    4
F                LL          2416      5                    5
D               LL          2530      5                    6
E                LL          2782      5                    7
C                AA        2840      6                    8
J                 DD        2907     6                     9
G                AA        3002     7                   10

I have written a measure like this

RANKX(ALLSELECTED('platform view'[platform]),CALCULATE(SUM('platform view'[sales])))

 

It is returning the correct result on Plarform level but when I pull Tier, ranking is wrong. Tier is coming from same table as platform.

 

Please guide me. what should I do so that when I pull tier in visual then ranking shouldn't get disturbed?

 

@amitchandak 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

First of all, many thanks to @bhanu_gautam  for your very quick and effective replies.

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1716857858731.png

2.Create the new measure to rank based on platform.

PlatformRank = 
RANKX(
    ALL('platform view'[Plaform]), 
    CALCULATE(
        SUM('platform view'[Sales]),
        ALLEXCEPT('platform view', 'platform view'[Plaform])
    ), ,ASC
)

3.Drag the new measure into the table visual.

vjiewumsft_1-1716857921880.png

4.The result is shown below.

vjiewumsft_2-1716857929469.png

Best Regards,

Wisdom Wu

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

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

First of all, many thanks to @bhanu_gautam  for your very quick and effective replies.

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1716857858731.png

2.Create the new measure to rank based on platform.

PlatformRank = 
RANKX(
    ALL('platform view'[Plaform]), 
    CALCULATE(
        SUM('platform view'[Sales]),
        ALLEXCEPT('platform view', 'platform view'[Plaform])
    ), ,ASC
)

3.Drag the new measure into the table visual.

vjiewumsft_1-1716857921880.png

4.The result is shown below.

vjiewumsft_2-1716857929469.png

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@bhanu_gautam  Thank you for reply but this way it isn't working I have tried using it already

bhanu_gautam
Super User
Super User

@Anonymous , 

You need to modify your measure to include the Tier column in the RANKX function. 

 

RANKX(ALLSELECTED('platform view'[platform], 'platform view'[Tier]), CALCULATE(SUM('platform view'[sales])))




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.