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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
andrew5083
Frequent Visitor

Coniditionally Format Color on Clustered Bar Charts

I'm brand new to Power BI.  We're comparing Power BI's capabilities to our current BI software to see if it may be a viable replacement.  In our current software, it is extremely simple to create custom, color based KPIs on any kind of chart or table.  I've spent the last day researching how to do this in Power BI, but have not found a way to accomplish the same.

 

In my example I have a simple clustered bar chart with three bars showing PYTD Sales, YTD Sales and a YOY Difference.  As shown below, I do not have any fields in the legend which should enable the ability to use conditional formatting options on the Data Colors section of the Format tab.  However, I only have the ability to select static colors.

 

andrew5083_0-1608052430401.png                         andrew5083_1-1608052540204.png

If I create a bar chart with just YOY Diff, I do have the ability to create conditional formatting on the color.  However, it is not efficient to have this data spread across multiple charts.  

 

I've also attempted to create a color measure to use to color the bar, however any chart that has >1 column in it does not have the ability to conditionally format.

 

Any advice is appreciated.

 

 

1 ACCEPTED SOLUTION

Hi @andrew5083 ,

As far as I know, currently multiple fields applying conditional format could not support in power bi charts visual.

You can vote for these simliar idaes or create a new idea here to help us improve power bi and make this feature coming sooner:

  1. Conditional Formatting in Clustered column chart 
  2. Conditional Formatting in Bar chats 
  3. Enable Conditional formatting for Legends and columns series in Stacked bar 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

This is unfortunate. I have been working on getting conditional formatting in bar charts for two days now. I only see conditional formatting options in Guage and Funnel charts, but nothing for scatter, bar, clustered bar, etc. I have seen posts all over the web on people applying fx formats to these chart types, but none of the methods work for me in older or recent versions of PBI Desktop and PBI RS Desktop. It isn't due to how I am configuring my measures either.

Further, I am unable to upvote these on Microsoft Idea, which is likely an issue for others, so these basic features are lacking upvotes I suspect.

Please add this behavior to all OOtB visualizations. It's a major shortcoming of PBI.

littlemojopuppy
Community Champion
Community Champion

Hi!

 

You can create a measure assigning the different colors such as the following

 SWITCH (
    TRUE (),
    ISBLANK ( [Projected Active Users % of Target YTD] ), "#FFFFFF00",
    [Projected Active Users % of Target YTD] < .9, "#FF0000",
    [Projected Active Users % of Target YTD] < 1, "#FFFF00",
    [Projected Active Users % of Target YTD] < 1.25, "#00CC00",
    [Projected Active Users % of Target YTD] >= 1.25, "#0099FF",
    BLANK ()
)

 and then apply it as conditional formatting.

 

https://docs.microsoft.com/en-us/power-bi/visuals/service-tips-and-tricks-for-color-formatting

@littlemojopuppy unfortunantely this doesn't work either.  I attempted this when creating a 'color measure' as referenced in my original post.  However, if there are >1 bar in a bar chart the option to conditionally format any color does not appear.  

It does work if you define the measure properly...have done it in a number of projects I've worked on

I'm not sure how else to define this measure properly.  Here is a simple if statement I've used to set the color based on pos or neg values.

andrew5083_1-1608065962583.png

 

As you can see in the picture, there are no options to conditionally format the color of any column in that bar chart.

 

If I add the created "Conditional Format" measure to the analysis, it only allows it to be added to the Tooltip section and still, no options to conditionally format any value colors appear.

 

Are you able to access the menu to apply conditional formatting to a bar chart with 2 or more values being represented as bars?

 

As I mentioned in my original post, the conditional formatting menu is available when a bar chart contains just 1 bar as shown below.  I can then use the created 'color measure' to color the bars.  However, this limitation does not create useful analyses for our user base.  

 

andrew5083_0-1608065730202.png

 

I'm wanting to see if something has been overlooked, or if this basic functionality is still not avaialble in Power BI.

Hi @andrew5083 ,

As far as I know, currently multiple fields applying conditional format could not support in power bi charts visual.

You can vote for these simliar idaes or create a new idea here to help us improve power bi and make this feature coming sooner:

  1. Conditional Formatting in Clustered column chart 
  2. Conditional Formatting in Bar chats 
  3. Enable Conditional formatting for Legends and columns series in Stacked bar 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors