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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bruleyn
Advocate I
Advocate I

Change legend text based on measure/column

I would like to change "Comparison 1 Line" legend entry to match the particular comparison type for a particular row, so that the table may be filtered for a particular measure and have the corresponding comparison label, e.g. "Goal" or "National Standard." Is this possible?

 

I know I can use a card to return a certain field in the currently filtered row--would I need to create an image for the blue circle and create the legend item manually, or is there an easier way? (Some rows don't need the constant line comparison, so it would be nice to be able to hide the legend item when there is no data-- currently I just set the value to 0 if there is no data.)

chart.JPG

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@bruleyn

AFAIK, it is not possible to hide the legend item when there's no data. You can submit your request at Power BI Ideas.

 

As a workaround, you can try to put the legend column in a slicer, only the selected legends would be displayed.

View solution in original post

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee

@bruleyn

AFAIK, it is not possible to hide the legend item when there's no data. You can submit your request at Power BI Ideas.

 

As a workaround, you can try to put the legend column in a slicer, only the selected legends would be displayed.

Would it be possible to do this if I used the R programming language or some other development process?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors