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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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