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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
KartheekJ
Frequent Visitor

Conditional formatting the colour of a specific column based on it's value in clustered column chart

Hi,

 

I have created a clustered column chart showing the Budget, Actuals and the Variance by Category as below

 

KartheekJ_0-1731338804826.png

 

Is there a work around to format the colour of Variance column, showing in Green for a positive value and in Red for a negative value?

 

Any help is appreciated.

 

Thanks,

Kartheek

10 REPLIES 10
anmolmalviya05
Super User
Super User

Hi @KartheekJ, Currently Power BI Doesnot support this, but as a workaround you can try below approach.

Split the variance into two measures: one for positive values and one for negative values.

Positive Variance =
IF([Variance] > 0, [Variance], 0)

Negative Variance =
IF([Variance] < 0, [Variance], 0)

In the Clustered Column Chart, add:

 

Budget

Actuals

Positive Variance

Negative Variance

Power BI will now plot the variances in separate columns.

Go to the Visualizations pane > Format Visual.

Under Data Colors, assign:

Green to "Positive Variance"

Red to "Negative Variance"


Please try this if it works

Hi @anmolmalviya05 , I have tried that approach.

 

The issue is when the variance is negative value, you get space between Buget, Actual and Negative Variance as shown below

 

KartheekJ_0-1731402887009.png

Is there a way to avoid that space ?

 

Thanks for your time

Can you please try modifying the measure by replacing zero by blank

Positive Variance =
IF([Variance] > 0, [Variance], blank())

Negative Variance =
IF([Variance] < 0, [Variance], blank())

I actually tried that only. My DAX is as follows

IF([Variance] >= 0, [Variance])

and

IF([Variance] < 0, [Variance]).

 

still getting tht space.

 

Tried now with Blank(). Still the same

 

Anonymous
Not applicable

Hi @KartheekJ , hello all, thank you for your prompt reply!

I think this is the default behavior because there are two measures occupying space.


Currently there is no such way to hide the placeholder simply even if it holds a null or zeor value.

 

Best regards,

Joyce

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




Bibiano_Geraldo
Super User
Super User

hi, @KartheekJ ,

Unfortunately, Clustered bar chart doesnt support conditional color change for columns in multiple values or field as explained in this post: Coniditionally Format Color on Clustered Bar Charts .

 

Thank you

Hi, any work around to achieve that?

Hi, @KartheekJ ,

The Idea where submited, you can vote by the link: Conditional Formatting in Clustered column chart 

Or submit your idea here.

 

Thank you

 

 

ray_aramburo
Super User
Super User

So far to my knowledge, unfortunately, Power BI still doesn't support conditional formatting when adding a Legend to the Clustered Column Chart.

Refer to this post for conditional formatting without legend.





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Hi, any work around to achieve that?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors