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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
RamiGamal
Frequent Visitor

Conditional Formatting Column Based Comparing Measure With Value in Column

Hello There,

 

I am having a column chart where 

X: Machine

Y: Actual Performance

 

Where "Actual Performance" is a Measure, I have also table similar to the below

MachineTarget
A90%
B95%
C85%

 

Now I want to conditional format the columns in the chart as:

If the Actual Performance >= Target then Green otherwise it shall be red.

I know it shall be done through conditional formatting by a field value but I am confused on how to construct the correct Measure.

 

Any help on this is much appreciated, Thanks

1 ACCEPTED SOLUTION
RamiGamal
Frequent Visitor

I have figured it out and I'm putting the solution here in case someone has a similar case:

1-Create a measure for your target

Target Measure = IF(DISTINCTCOUNT('Table'[Machine])=1,MAX('Table'Target))

Then another measure for conditional formatting

Conditional Format = IF([Performance]>= [Target Measure],"Green","Red")

Keeping in mind to have a relation between Machine columns If you have two table

View solution in original post

1 REPLY 1
RamiGamal
Frequent Visitor

I have figured it out and I'm putting the solution here in case someone has a similar case:

1-Create a measure for your target

Target Measure = IF(DISTINCTCOUNT('Table'[Machine])=1,MAX('Table'Target))

Then another measure for conditional formatting

Conditional Format = IF([Performance]>= [Target Measure],"Green","Red")

Keeping in mind to have a relation between Machine columns If you have two table

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.