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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Comparison of multiple columns in two tables

 Hi All,

 

I am trying to comparare multiple columns between two tables (Dev and Production).

 

(Table 1)Production: Reference, Type, Status, Date

(Table 2)Dev: Reference, Type, Status, Date

 

The three main attributes I need to base my report on are:  Type, Reference, Status

 

I need to create a report to show the rows in table 2 that are not matching to table 1 based on the attributes Type, Reference, Status. 

 

 

ReferenceTypeStatusProd Match?
ab1invoiceclosedProd - No match
bb2invoiceopenProd - No match
cb3creditpendingProd - No match
db4onlineopenProd - No match

 

Please can someone advise?

 

@Anonymous 

 

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous

 

You can first add a new column in each table to combine three columns:

Column = [Reference] &"-"& [Type] &"-"& [Status]

 

Then in Dev table, add the following column to get "Match"/"No Match" results. 

Match ? = IF(Dev[Column] IN VALUES(Production[Column]), "Match", "No Match")

 

This is a similar thread for your reference: https://community.powerbi.com/t5/Desktop/Compare-Names-between-tables/m-p/2123547 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Anonymous

 

You can first add a new column in each table to combine three columns:

Column = [Reference] &"-"& [Type] &"-"& [Status]

 

Then in Dev table, add the following column to get "Match"/"No Match" results. 

Match ? = IF(Dev[Column] IN VALUES(Production[Column]), "Match", "No Match")

 

This is a similar thread for your reference: https://community.powerbi.com/t5/Desktop/Compare-Names-between-tables/m-p/2123547 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

amitchandak
Super User
Super User

@Anonymous , one way is that you create common dimension or dimensions for Type, Reference, Status

Join with both tables and show count of date from both table and put visual level filter for count from table 1 is blank

 

Second one is new table with except

except (summarize(Table1,[Type], [Reference], [Status]),summarize(Table2,[Type], [Reference], [Status]))

Anonymous
Not applicable

Hi @amitchandak,

Thank you - I also need to show the rows of both tables 1 and 2 that don't match. Do I need to include an additional query?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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