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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Conditional Formatting of Bar Chart

I would like the bars that are below the target value to be red and those equal to or above target to be green.  I do not see the 'divergent' color bar options .. do I have an old version of the app?

 

 pbi2.PNG

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

@Anonymous

 

Set.png




Lima - Peru

View solution in original post

20 REPLIES 20
hamzahad91
Helper I
Helper I

How can we go if the target is variable ?

@hamzahad91

Currently there is no way to format the column based on a variable value. Conditional formatting will only work for a hard coded value (Min/Max value).

You can conditional format a column based on a wide range of values   For example, if I set my min color to red and min value to -1, then any column that has a numerical value less than -1 will show up as red.    Conversely, if I set my max color to green and my max value to 1, any column that has a value >1 will have a color of green.    This is assuming I have my numerical column field  in both the value well and the color saturation well.

Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, The divergent option is show when you add a column or measure in Color Saturation.




Lima - Peru
Anonymous
Not applicable

Thank you ... I see it now.  Can you advise on how to dynamically change the color based on the target value?  If below 95 then red and if >=95 it should be green?

pbi2.PNG

 

 

 

 

@Anonymous

 

Set.png




Lima - Peru
Anonymous
Not applicable

Hi , Please explain it in detail , you only posted pic. I am not getting option.


@Vvelarde wrote:

@Anonymous

 

Set.png


 

Anonymous
Not applicable

I got it by hovering over the area next to default color in data colors to get conditional formatting to appear.  It's not very intuitive.

 

ConditionalFormat.png

Anonymous
Not applicable

How do you get these options to appear?  I don't see anything about divergent/conditional formatting for my charts.

 

 

Here's what you need to do to achieve this - 
There is an option in the Format pane called Data Color. When you expand the Data Color option, HOVER on the Default Color option and you will see three dots. Once you click on these dots, you will see the option of Conditional Formatting. Click on Conditional Formatting to see more options for formatting.
 
Click on Format Pane > Click on Data Color > Hover on Default Color and Click on three dots > Click on Conditional Formatting 

@Anonymous @ThirdI I do not seem to have that option and I cannot figure out why. Nothing appears when I hover either.

Capture.PNG

The "solution" seems to be "you can't do it," which is all too common in Power BI.

Anonymous
Not applicable

Hi Team,

I need my data bar to have only two colours. I have an average line. The value below average should have red and above should have green. When I apply the field in colour saturation and in 'Format' when I give color code for Minimum ans Maximum, I get bars in the middle with combination of both green and red, values above one are a gradient shade of green, and bars below one are shades of red. I don have any fixed value to be given as minimum and maximum as values changes dynamically with average line. 

Can you suggest a way to sort this. 

Thanks in advance. 

 

Hi Crazybi,

Unfortunately, min and max can't be dynamic.   But you can create a separate chart based on a calculated column or measure that represents the difference between a data point and the average.   If I subtract the average from a data point, the results will always be positive if the data point is above the average, and alway negative if below.   You could tie these difference values to color bars using the max of 0 and min of -1.

 

I know this isn't the solution you are  looking for, but it might be usable as a supplemental visual to highlight above/below avg in a way that varies, even while the min/max values remain fixed.

 

 

 

Anonymous
Not applicable

Thanks! Hadn't thought of doing this yet - still working in 2019 😄

Anonymous
Not applicable

Thank you!  Got it .... I had the wrong field in the Color Saturation area. 

Anonymous
Not applicable

Thank you ... I see it now.  Can you advise on how to dynamically change the color based on the target value?  If below 95 then red and if >=95 it should be green?

 

 

Anonymous
Not applicable

I would like the bars that are below the target value to be red and those equal to or above target to be green.  I do not see the 'divergent' color bar options .. do I have an old version of the app?

 

 

 

 

 

 

 

Anonymous
Not applicable

I would like the bars that are below the target value to be red and those equal to or above target to be green.  I do not see the 'divergent' color bar options .. do I have an old version of the app?

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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