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 on Bar Chart - does not work with Measure/Calculated Column

Hi! 

 

I have a problem with the conditional formatting of a bar chart. Under data colors, it does not show the advanced controls option you would usually get. So I decided to make a calculated column that said the following: 

Average Handling Color = IF([Handling Time] <= 5; 1; 0)

I am not that great at making calculated columns, so of course this did not work.  
However, I saw a guy do the same thing but basically with a measure. I figured, worth a shot so I wrote the same thing in a measure. When I add the measure to the chart, it will give the correct result, but I cannot place the measure in the legend field in order to conditionally format it "manually", so to say. 

 

 

Fields listFields listBar chart with 1's of the measureBar chart with 1's of the measure

I assume I did something wrong with my calculated column or measure and that the solution is close but I cannot find something for the life of me. 

Thanks in advance for the help! 

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

1. Now conditional formatting of a bar chart still Under data colors.

Please move the mouse to the place as below:

1.JPG

 

2. If you want to use Conditional Formatting on Bar Chart, you could only drag one field into Value

For your case, don't drag Coloring into value, just use this measure for Conditional Formatting.

2.JPG

 

If you still have the problem, please share a simple sample pbix file and expected output.

 

Best Regards,

Lin

Community Support Team _ Lin
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

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

1. Now conditional formatting of a bar chart still Under data colors.

Please move the mouse to the place as below:

1.JPG

 

2. If you want to use Conditional Formatting on Bar Chart, you could only drag one field into Value

For your case, don't drag Coloring into value, just use this measure for Conditional Formatting.

2.JPG

 

If you still have the problem, please share a simple sample pbix file and expected output.

 

Best Regards,

Lin

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

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.