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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
powertron
New Member

Showing Consistent Colors on a Graph Legend

Hi,

 

I have a bar graph which is showing values from a table, this graph has a date range which can be lowered/increased to show information over different timeframes.  Standard stuff so far.

When selecting data over "all time" there are 4 values represented on this graph : 

powertron_0-1678185354080.png

However when lowering the date range some ranges do not have all 4 values, so the legend/color scheme is changing : 

powertron_1-1678185765532.png

Is there a way to have a consistent "Light Blue = Completed" "Dark Blue = Not Started".... type value set anywhere so the graph has consistent colors no matter the values presented on it?

 

 

8 REPLIES 8
LaurenceSD
Advocate II
Advocate II

Hi,

 

I experienced this as well & found the fix was to select Show items with no data

 

LaurenceSD_0-1678191528779.png

 

This way when one field drops off due to having no data the colours will remain the same as it'll still be there in the legend bar

Hi,

 

I've tried this (assume I should be selecting this on the "Legend" value?) : 

powertron_0-1678193348247.png

However the issue is the same.  If I select a date range where only 2 of the values are selected it shows one color scheme : 

powertron_1-1678193396391.png

And this is not consistent when there are more values: 

powertron_2-1678193425660.png

Is your legend data coming from a Fact or Dimension table? I'm guessing it's the former, if you put the legend data into a Dimension data and then create a 1 to many relationship, then the method mentioned above should work

MAwwad
Solution Sage
Solution Sage

Yes, you can manually set the colors for each category in the legend of your Power BI bar graph. Here's how to do it:

  1. Click on the bar graph visualization to select it.
  2. In the Visualizations pane, click on the Format tab.
  3. Expand the "Data colors" section.
  4. By default, the colors will be set to "Automatic". To set your own colors, click on "Custom colors".
  5. In the "Custom colors" section, click on the dropdown arrow next to the category you want to set a color for.
  6. Choose "Specific color" and select the color you want to use for that category.
  7. Repeat this process for each category in the legend.

Once you have set the colors for each category, they will remain consistent regardless of the data being displayed.

Note: If you add new categories to your data, you will need to manually set the colors for those categories as well.

I have stacked car chart with only top 7 selection. I know how to change the colors, but that is only for the initial selection. When I change slicer, I get different colors. How do I keep the colors consistent?

Hi,

 

Clicking on the Graph and selecting the "Visualisation" option does not show a "Data Colors" option that I can see : 

powertron_0-1678188428166.pngpowertron_1-1678188445034.png

 

I've opened every sub menu and can't see anywhere to set Data Colors.

 

 

 

I have the same issue, that is there is no "Data colors" section 

Hi,

 

The "Columns" data does have a "Colors" option but nothing to suggest I can turn on/turn off auto selection : 

powertron_2-1678188622754.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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