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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
iuli
Regular Visitor

Conditional formatting for Total Label on stacked column chart

Hello, 

 

I used a measure to color the total label in red / green. For a matrix works ok, but not for total label. 

Capture.PNG

5 REPLIES 5
iuli
Regular Visitor

the attached picture shows how the conditional rule is appyed using the above color measure

Capture2.PNG

Anonymous
Not applicable

Hi @iuli ,

Can I know that are the field Products_CY and Products_PY fact fields of the table or measures? If they are measures, could you please provide their formula? By the way, all of fields which apply on the stacked column chart visual are all from the same table? It is better if you can provide a simplified pbix file. Thank you.

Best Regards

Hello, 

 

Products_CY and Products_PY  are fact fields of the table , but I tested also with measures and had the same result. Please try to download the pbix file via this link : 

publicerep/test total label color.pbix at main · iulianalidia/publicerep (github.com)

 

Thank you !

iuli
Regular Visitor

Hi,

 

the measure is : 

color = SWITCH(TRUE(), SUM('Table'[Products_CY]) > SUM('Table'[Products_PY]), 1 , 0 ) // 1=red, 0=green
amitchandak
Super User
Super User

@iuli , can you share the color measure ?

 

refer, if needed

How to do conditional formatting by measure and apply it on pie? : https://youtu.be/RqBb5eBf_I4

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors