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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!