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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PowerBIspeed
Frequent Visitor

Conditional formating based on two columns in differant tables.

Hi,

I want rows to turn red when two columns in a report are not equal.

These are two columns wich are both in a dfferant table.

I tryed several things but its not working. 

I doesnt matter for me if the whole row or just one cell in the row turns red.

Thank you in advance.

1 ACCEPTED SOLUTION
arichard19
Resolver I
Resolver I

I would suggest trying following -

Create a measure where you substract Column[1] from Column[2]
-
Column Difference = Column[1] - Column[2]
-
Then, you will want to apply conditional formating based on the above Column Difference Measure.

If the Column Difference is different from 0, the conditional formatting should be red
-

Colour Project =
VAR Diff = ColumnDifference
RETURN IF(Column Difference <> 0, "#40E0D0", "#FFA07A")

Apply the measure as such ->
 
arichard19_2-1657181749627.png

 


 

View solution in original post

3 REPLIES 3
PowerBIspeed
Frequent Visitor

@arichard19 This was the most usable solution for me.  Thanks for this.

Anonymous
Not applicable

Hi @PowerBIspeed ,

 

Conditional formatting is relative to the field, if you want to change the color of the entire row, you need to apply conditional formatting to all fields.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

arichard19
Resolver I
Resolver I

I would suggest trying following -

Create a measure where you substract Column[1] from Column[2]
-
Column Difference = Column[1] - Column[2]
-
Then, you will want to apply conditional formating based on the above Column Difference Measure.

If the Column Difference is different from 0, the conditional formatting should be red
-

Colour Project =
VAR Diff = ColumnDifference
RETURN IF(Column Difference <> 0, "#40E0D0", "#FFA07A")

Apply the measure as such ->
 
arichard19_2-1657181749627.png

 


 

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.