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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
kowas2
Advocate I
Advocate I

Conditional formatting for difference between bars?

1000202823.jpg

 Hi,

 

Essentially I'm building a headcount report, and i have a table (by month) showing our cumulative attrition against a target attrition rate. I have conditional formatting on the table if attrition is above target.

 

I was hoping to express this conditional in a visualisation too, to express any large deviation from the target. Is there any custom visual or any way to show what I want? Thanks for any help!!

 

Alsoo all my values are measures i can use

1 ACCEPTED SOLUTION
Rupa01
Impactful Individual
Impactful Individual

Hi @kowas2,

Check out below solution which is a workaround as directly adding Cumulative Attrition % and Target % to the clustered column chart will not enable conditional formatting or can show conditional formatting for only diff%.

Create two measures - Attrition % (Less) and Attrition % (More) - It helps to show less % bar as green and more % bar as red. 

Attrition (Less) = IF(SUM(Table1[Cumulative Attrition %])<= SUM(Table1[Target %]), SUM(Table1[Cumulative Attrition %]))
Attrition (More) = IF(SUM(Table1[Cumulative Attrition %])> SUM(Table1[Target %]), SUM(Table1[Cumulative Attrition %]))

Add these two measures along with Target % to clustered chart.

Go to Visual Formatting > Columns > Choose Series > Choose each field and select colour for each of them.

Check below example for Attrition Less

Rupa01_2-1784199940556.png

Then, in Columns > Choose Series - All > Layout > Modify changes as below to align the bars accordingly. 

Rupa01_1-1784199810433.png

Result

Rupa01_0-1784199659899.png

 

💡 Helpful? Give a Kudos 👍 — keep the community growing
 Solved your issue? Mark as Solution ✔️ — help others find it faster

Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer 

 

View solution in original post

3 REPLIES 3
Abhilash7181
Frequent Visitor

Nice Workaround!👏

Rupa01
Impactful Individual
Impactful Individual

Hi @kowas2,

Check out below solution which is a workaround as directly adding Cumulative Attrition % and Target % to the clustered column chart will not enable conditional formatting or can show conditional formatting for only diff%.

Create two measures - Attrition % (Less) and Attrition % (More) - It helps to show less % bar as green and more % bar as red. 

Attrition (Less) = IF(SUM(Table1[Cumulative Attrition %])<= SUM(Table1[Target %]), SUM(Table1[Cumulative Attrition %]))
Attrition (More) = IF(SUM(Table1[Cumulative Attrition %])> SUM(Table1[Target %]), SUM(Table1[Cumulative Attrition %]))

Add these two measures along with Target % to clustered chart.

Go to Visual Formatting > Columns > Choose Series > Choose each field and select colour for each of them.

Check below example for Attrition Less

Rupa01_2-1784199940556.png

Then, in Columns > Choose Series - All > Layout > Modify changes as below to align the bars accordingly. 

Rupa01_1-1784199810433.png

Result

Rupa01_0-1784199659899.png

 

💡 Helpful? Give a Kudos 👍 — keep the community growing
 Solved your issue? Mark as Solution ✔️ — help others find it faster

Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer 

 

thats such a cool workaround!! thank youu 💕💕

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors