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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to compare two table column values in power bi?

I'm comparing the two tables .Policy number is the unique.

Table A:

Status  Type    Date        PolicyNo
PS      T607    01-01-2020  1002
PS      T608    02-01-2020  1003
CF      T646    03-01-2020  1004
PS      T607    04-01-2020  1005

Table B:

Status  Type    Date        PolicyNo
PS      T607    01-01-2020  1002
PS      T608    02-01-2020  1003
CF      T645    03-01-2020  1004
PS      T607    04-01-2020  1005

and conditions are

1) If both table values have same PolicyNo(1002), day, status(PS/CF), transaction id(T607 && T608) ((both tables should match)) then I have to ignore otherwise consider and find which column is have mismatch.

 

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Anonymous,

 

Try this calculated table:

 

TableA_vs_TableB = 
VAR vTableAExceptB =
    EXCEPT ( TableA, TableB )
VAR vTableBExceptA =
    EXCEPT ( TableB, TableA )
VAR vResult =
    UNION ( vTableAExceptB, vTableBExceptA )
RETURN
    vResult

 

DataInsights_1-1607704303639.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@Anonymous,

 

Try this calculated table:

 

TableA_vs_TableB = 
VAR vTableAExceptB =
    EXCEPT ( TableA, TableB )
VAR vTableBExceptA =
    EXCEPT ( TableB, TableA )
VAR vResult =
    UNION ( vTableAExceptB, vTableBExceptA )
RETURN
    vResult

 

DataInsights_1-1607704303639.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@Anonymous 

Just as an addition to @DataInsights solution, you can use this as a measure by simply adding COUNTROWS as the first function of the RETURN expression and use this as in the filter pane and setting the value to 2 or greater for a table visual





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.