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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Question about labels

Hello everyone, good afternoon.

 

In my report I have this graph:

 

marciofilho_0-1704910047758.png

 

This graph shows the production through vertical bars alongside the cumulative goal represented by dashed lines. Currently, the labels indicate the percentage of production relative to the accumulated goal. My inquiry pertains to the following:

Is it possible to modify the labels to showcase the ranking of each supervisor? The parameter for this ranking would be based on performance rather than production. I would appreciate insights on the viability of implementing this adjustment.

 

So it would look similar to this:

You get the ideaYou get the idea

 

 

The measure needs to be dynamic as I intend to apply filters based on date and location. Once the measure is done, I plan to implement a conditional statement like the following:


IF ( supervisor_ranking = 1, supervisor_ranking, "")


To display only the top ranked lable.

 

Hopefully I've made myself clear.

 

Thanks in advance.

1 ACCEPTED SOLUTION

@Anonymous Ah, got it. Yes, you can use a measure for the Value field for data labels so you should be able to code this to whatever you want. You will need to do a ranking of ALL the supervisors and then determine if the current context supervisor is the top 1 (or whatever your logic) and you could return a UNICHAR of a star for example for the top on.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

That's how the table looksThat's how the table looks

 

The whole goal of my question is to put a STAR on top of the top-ranked supervisor (using custom label functionality). Like this:

marciofilho_1-1704915182512.png

 

 

Greg_Deckler
Community Champion
Community Champion

@Anonymous Not sure I am entirely clear but it seems like you essentially need a "Sort by column" except that won't exactly work because you need the sorting to be dynamic. Not sure there is a solution for that.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler , thanks for the reply.

 

Let me try to explain. Power BI has recently introduced a new feature called "Custom Label." I am exploring the possibility of utilizing this function to generate a custom label that displays the rank of each supervisor. Specifically, I am interested in understanding the feasibility of creating a measure that calculates the rank based on the performance of the supervisor.

 

So when I filter the months or date I could see who was the top-ranked supervisor based on their performance, not solely on production metrics.

 

@Anonymous Ah, got it. Yes, you can use a measure for the Value field for data labels so you should be able to code this to whatever you want. You will need to do a ranking of ALL the supervisors and then determine if the current context supervisor is the top 1 (or whatever your logic) and you could return a UNICHAR of a star for example for the top on.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Now the only problem is this

marciofilho_0-1704973707902.png

Instead of displaying the it simply shows the code (I'm using the Power BI Report Service in PBI Desktop works just fine).

 

Anonymous
Not applicable

@Greg_Deckler , thank you very much!
This measure
RANKX(
ALL(producao[supervisor]),
[performance],,DESC,Dense
)
did the job.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.