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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Chanleakna123
Post Prodigy
Post Prodigy

Conditional formatting based on Value Vs. Target

hi , 

how to set conditional formatting on Bar Chart based on Value Vs. Target ?
if the value < target => Red Bar chart 

if the value > target => Green Bar chart 

 

thx you 

 

6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @Chanleakna123 

 

If above posts don't meet your requirements, kindly share your sample data and expected results to me if you don't have any Confidential Information. Please upload your files to One Drive for business and share the link here.

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Chanleakna123 

Create a measure like this

 

Color Hours = SWITCH(true(),
Sum([Target]) > 10,"green",
"red"
)

 

You can have more conditions.

I used a clustered chart. There In data Color,  On group by I clicked on advance Control (You will see three dots on hover click on that).

 

There choose field option in first LOV and choose this measure

 

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

@amitchandak , hi , i have different target in each category , the target not sustain based on month . 

i think above is not work . 

 

@Chanleakna123 - This is where sample data would be very useful.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Try

Color Category = SWITCH(true(),
Max(Sheet1[Category]) in {"A",} && Sheet1[Target]<10,"green",
Max(Sheet1[Category]) in {"B"} && Sheet1[Target]<10,"orange"
"red"
)

 

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.