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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Conditional Format Based on Two Columns

Hi Everyone,

 

I have a dataset similar to the below.

 

DateJob ID% AchievedCalculated % Achieved
01/01/202211010
02/01/202222020
03/01/202233030
04/01/202244040
05/01/202255020

 

Using the above data in a table visual, I want to be able to highlight a cell when the '% Achieved' is different from the 'Calculated % Achieved'. 

 

For example, the above dataset would highlight 'Job ID' '5' on the '% Achieved' column as it has different values for '% Achieved' and 'Calculated % Achieved'.

 

Any ideas on how this can be achieved?

1 ACCEPTED SOLUTION

Hello,

I am not sure if it will work for you, but it worked for my scenario.  

Please create a new measure and label it.

anonymous123141_1-1666887455763.png

 

Test=VAR chk(Sum(Table ID[JobID%]

Var chk2(Sum(TableID[AchievedCalculater%]

Return IF(Chk=Chk2,"#aaaaa","#bbbbb")

 

After you enter the measure, go to the conditional formatting for the row you want, select field value, values only, and the measure you created.  Select ok, and your table should refresh.  Please let me know if it helps.

anonymous123141_0-1666887329914.png

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

HI @Anonymous,

I'd like to suggest you create a measure formula to check and compare values to return color code, then you can use it in conditional formatting:

Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

If you are confused about the coding formula, please share some dummy data and the measure formulas that you mention in the above sample:

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Thanks for your response.

 

I am confused on how to create a measure reffering to two columns in order to conditional format different values in the same row.

 

Sample dataset:

 

DateJob ID% AchievedCalculated % Achieved
01/01/202211010
02/01/202222020
03/01/202233030
04/01/202244040
05/01/202255020

 

Bold text shown above will need to be highlighted as it shows two different values in the same row.

 

Hope this helps.

Hello,

I am not sure if it will work for you, but it worked for my scenario.  

Please create a new measure and label it.

anonymous123141_1-1666887455763.png

 

Test=VAR chk(Sum(Table ID[JobID%]

Var chk2(Sum(TableID[AchievedCalculater%]

Return IF(Chk=Chk2,"#aaaaa","#bbbbb")

 

After you enter the measure, go to the conditional formatting for the row you want, select field value, values only, and the measure you created.  Select ok, and your table should refresh.  Please let me know if it helps.

anonymous123141_0-1666887329914.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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