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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to count mismatch of two columns in two tables?

I have one colum in a table for emplyee names (data base), and another table contains the same employes names (manual entry). I want to check if there was any mismatch between them. 

I was thinking using measure = Countrows(Filter(Table1,Table1[colum1]<>Table2[column2].

but Filter function only works in a single table. What should my approch be? Thanks  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

Table1:

vyangliumsft_0-1704864503679.png

Table2:

vyangliumsft_1-1704864503680.png

 

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Table1'[column1])=
LOOKUPVALUE(
    'Table2'[column2],'Table2'[employes names],MAX('Table1'[employes names])),"match","mismatch")

2. Result:

vyangliumsft_2-1704865084932.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

Table1:

vyangliumsft_0-1704864503679.png

Table2:

vyangliumsft_1-1704864503680.png

 

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    MAX('Table1'[column1])=
LOOKUPVALUE(
    'Table2'[column2],'Table2'[employes names],MAX('Table1'[employes names])),"match","mismatch")

2. Result:

vyangliumsft_2-1704865084932.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

philouduv
Resolver III
Resolver III

Hello @Anonymous ,
An other approach could be to create a calculate column where you know the values are correct(Tablereference).

MisMatch = If(CALCULATE(COUNTROWS(Tabletocheck),FILTER(Tabletocheck,
Tablereference[name] == Tabletocheck[name])) > 0, "Match", "Not match")
tamerj1
Super User
Super User

Hi @Anonymous 

please try

=
COUNTROWS ( EXCEPT ( VALUES ( Table1[colum1] ), VALUES ( Table2[column2] ) ) )

Anonymous
Not applicable

Thanks! is there a function I can use to display the mismatch as well?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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