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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
abhay03
Helper I
Helper I

Compare two columns in a table visual

 

In a table, I want to compare two columns side by side and highlight the differences like second image below:

image.png

 

image.png

 

 

How can this be achieved in a Table visual in Power BI? 

1 ACCEPTED SOLUTION

Hi @abhay03,

Until now, custom color isn't supported in Power BI, please review the feature requests and vote them. 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/17339728-more-flexible-conditiona...

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/16417966-conditional-formating-fo...

For your requirement, you can create a calculated column using the formula below.

Flag = IF(Test[Sales-DB]=Test[Sales_File],1,0)

2.PNG

Then you can use conditional formatting to set the color of Flag column as follows.

1.PNG
You will get the result.

2.PNG

Best Regards,
Angelia

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Good Afternoon,

Please check my "IF" statement. 

AbegaelFollero_0-1619525064264.png

Also, please advise to resolve the error encountered.

Thank you.

This isn't a solution Abegael, it produces an error

 

Fraukje
Advocate II
Advocate II

Hi @abhay03,

 

If you are using a Table type of visual, you can use 'Conditional formatting'. Did you check this out yet?

Check out https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-conditional-table-formatting/

for more info.

Hi @Fraukje,

 

Conditional formatting gives the option to format a single column. In my case, I'm looking to format one of the columns after comparing it to another column.

Hi @abhay03,

Until now, custom color isn't supported in Power BI, please review the feature requests and vote them. 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/17339728-more-flexible-conditiona...

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/16417966-conditional-formating-fo...

For your requirement, you can create a calculated column using the formula below.

Flag = IF(Test[Sales-DB]=Test[Sales_File],1,0)

2.PNG

Then you can use conditional formatting to set the color of Flag column as follows.

1.PNG
You will get the result.

2.PNG

Best Regards,
Angelia

Angelia - Do you know if it's possible to use this calculated column when the dates are in two different tables in the model?

Anonymous
Not applicable

I think you can best merge the column you want to compare in the other table and then follow the above steps.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors