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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
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.