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
jay3vedi
New Member

How to apply conditional formatting on data level in clustered bar chart ?

Hello Team,

I'm encountering an issue where I've utilized a clustered bar chart to represent some data. I need assistance with a specific requirement: for negative values in the chart, I want the bars to be displayed in red color. Can someone provide guidance on how to achieve this? Your help would be greatly appreciated. I have included a visual representation for reference.barchart.PNG

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

Hi @jay3vedi ,
According to your description and the example screenshot provided, you are using a clustered bar chart. And in this example screenshot you have categorized these. As you can see on the chart, the negative numbers are in the same category, and if you want to change the color, go to -> Format ->Bars->Appply setting to targrt type->Change color to red

vheqmsft_0-1712220494057.png

But from your description then you are trying to turn all the negative bars red. This is not possible because your category determines the color of your series of bars. But you can achieve the effect you want by changing the color of the data lable. First create a measure, then go to Format -> Data labels ->value ->apply measure to conditional formatting

vheqmsft_1-1712222078689.png

vheqmsft_2-1712222093959.png

Fianl output

vheqmsft_3-1712222165254.png

Best regards,

Albert He

 

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

3 REPLIES 3
v-heq-msft
Community Support
Community Support

Hi @jay3vedi ,
According to your description and the example screenshot provided, you are using a clustered bar chart. And in this example screenshot you have categorized these. As you can see on the chart, the negative numbers are in the same category, and if you want to change the color, go to -> Format ->Bars->Appply setting to targrt type->Change color to red

vheqmsft_0-1712220494057.png

But from your description then you are trying to turn all the negative bars red. This is not possible because your category determines the color of your series of bars. But you can achieve the effect you want by changing the color of the data lable. First create a measure, then go to Format -> Data labels ->value ->apply measure to conditional formatting

vheqmsft_1-1712222078689.png

vheqmsft_2-1712222093959.png

Fianl output

vheqmsft_3-1712222165254.png

Best regards,

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Uzi2019
Super User
Super User

Hi @jay3vedi 

Refer this video below

https://www.youtube.com/watch?v=MItQGef79Lc

 

I hope this resolves your issue!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi @jay3vedi 
Or you can try with measure

Color= if(sum(sales)<0, "red")
use this color measure in conditional formatting of column color 

Uzi2019_0-1712058210288.png

 

 

select filed value and measure color under setting of column color.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

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.