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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
L1394
New Member

undefined

Hello everyone, 

I am trying to write a dax measure to apply colors to chart based on employee performance. I have employee performance sorted for q1,q2,q3,q4 and also each employee have different targets. I was told to give green if they meet their target or else red. But the only issue is lets say emp1 could not able to meet his target in q3 so in the chart it should shown as q3 in red and rest in green. Let me know if anyone knows about it. Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @L1394 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a measure as below

Conditional formatting = IF ( SUM ( 'Table'[performance] ) >= SUM ( 'Table'[target] ), "green", "red" )

2. Toggle on the option "Data labels" and configure conditional formatting for it

vyiruanmsft_0-1698902368772.png

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @L1394 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a measure as below

Conditional formatting = IF ( SUM ( 'Table'[performance] ) >= SUM ( 'Table'[target] ), "green", "red" )

2. Toggle on the option "Data labels" and configure conditional formatting for it

vyiruanmsft_0-1698902368772.png

Best Regards

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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