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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MAVIE
Helper I
Helper I

Hide or edit individual legend items

Hi all,

 

I have created a combined line and column chart, in which the column "Net Activity" have a custom color formatting to show when a value is below or above 0. However, after creating the custom formatting, the column legend shows the original color of the column. I have been unable to find a way to either hide the legend item or edit it to not show any color next to "Net Activity".  
In the very least would like to maintin the legend item for "Daily Average" line.

 

MAVIE_1-1683025235069.png

Any suggestion for how to do this would be greatly appreciated.

 

3 REPLIES 3
FarhanJeelani
Solution Supplier
Solution Supplier

In Power BI, achieving this type of legend customization can be challenging, as there's no direct way to remove or change the color indicator in the legend for conditional formatting. However, here are some workarounds to achieve a similar effect:

 

Option 1: Separate Legends with Text Boxes
1. Turn off the Legend: In the Visualizations pane, go to the "Format" section, find the "Legend" option, and toggle it off.


2. Add Custom Text Boxes for Legends: Create a text box for each legend item you want to display. For example, add a text box labeled "Net Activity" and another labeled "Daily Average."


3. Add Indicators Manually: You can use shapes (such as circles or squares) or images in Power BI to create custom color indicators next to the text boxes, if desired. Set the color for each shape to represent the corresponding measure.

 

Option 2: Create a Custom Legend in Power BI Desktop
1. Create a Custom Legend Table: In Power BI, you can create a separate table that contains the legend items you need, with columns for the name and color.


2. Use a Card or Multi-row Card Visual: Display this table using a Card or Multi-row Card visual and place it above or near the chart to serve as a custom legend. This lets you format colors or icons as desired without altering the chart itself.

 

Option 3: Use a Secondary Chart for Legend
1. Duplicate the Chart for Legend Purposes: Create a duplicate of your chart, but only display the "Daily Average" line in this duplicate.


2. Overlay or Position the Chart Legend: Turn on the legend for this secondary chart and position it to align with your main chart. This way, only the "Daily Average" legend appears on the duplicated chart while hiding the "Net Activity" legend item.

 

thank you for detailed explanation. Nice workaround, since this is not my thread, I cannot mork this is oolved, but for me this works 👍

hanswittoeck
Helper II
Helper II

you ever found a solution for this?

I'm facing the same problem

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.