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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Freeseman
Helper II
Helper II

Rank Top 3 by Gold Silver Bronze

Good day,

 

Is there a method of ranking top 3 percentage by color Gold, Silver, Bronze?

Freeseman_1-1664347591902.png

 

 

1 ACCEPTED SOLUTION

Hi,

Thank you for your feedback.

I tried to create a sample pbix file like below.

 

Please try the below.

Please check the attached pbix file as well.

 

Jihwan_Kim_0-1664368646079.png

Color measure: = 
VAR _ranking =
    RANKX (
        ALL ( Data ),
        [Performance measure:],
        ,
        DESC
    )
RETURN
    SWITCH (
        TRUE (),
        _ranking = 1, "Gold",
        _ranking = 2, "Silver",
        _ranking = 3, "Yellow"
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Could you please write a measure something like below, and put it into the visualization?

 

Color measure: =
VAR _ranking =
    RANKX (
        ALL ( 'TableName'[Badge number], 'TableName'[Operator Name] ),
        [Performance],
        ,
        DSC
    )
RETURN
    SWITCH (
        TRUE (),
        _ranking = 1, "Gold",
        _ranking = 2, "Silver",
        _ranking = 3, "Bronze"
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


I feel like something is missing from the true () statement?

I am not sure but all cells are gold.

Freeseman_0-1664368061999.png

 

Hi,

Thank you for your feedback.

I tried to create a sample pbix file like below.

 

Please try the below.

Please check the attached pbix file as well.

 

Jihwan_Kim_0-1664368646079.png

Color measure: = 
VAR _ranking =
    RANKX (
        ALL ( Data ),
        [Performance measure:],
        ,
        DESC
    )
RETURN
    SWITCH (
        TRUE (),
        _ranking = 1, "Gold",
        _ranking = 2, "Silver",
        _ranking = 3, "Yellow"
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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