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 validate that two data sources have identical fields and field values?

Hi all.

 

I have two different data sources with about ~30 fields each. I quite simply want to confirm whether the same fields and field values exist in both sources.

 

For example, if Table A has a field called "Color" with field values of "Red", "Green", "Blue", and Table B also has the same field with the same values, then I want to know that. If the two tables have any discrepancy, such as Table B having the options "Red", Orange", "Blue", then I want to know. Additionally, if Table B doesn't have a field named "Color" at all, then I want to know.

 

This exercise needs to be done for all ~30 fields in the first data source. Is there a clean and efficient way to do this? I have the two data sources ready and loaded. Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

If you want to find the difference between two tables, you could use merge and append in power query editor.

TableA:

1.png

TableB:

2.png

Merge TableA and TableB Left anti.

3.png

Result:

5.png

Merge TableB and TableA Left anti.

Result:

6.png

Append:

7.png

Result:

8.png

If this reply still couldn't help you to solve this problem, please show me more details. You can provide a sample (your table A and tableB) to me and show me the result you want, it may be easier for me to understand your requirement.

You can download the pbix file from this link: How to validate that two data sources have identical fields and field values?

 

Best Regards,

Rico Zhou

 

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

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

amitchandak
Super User
Super User

@Anonymous , except, intersect

https://docs.microsoft.com/en-us/dax/intersect-function-dax

https://docs.microsoft.com/en-us/dax/except-function-dax

 

except(all(table[col1),all(table[col1]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

mmiculcy_0-1597254997337.png

 

@Anonymous , The code was for table

new table = except(all(table1[col1),all(table2[col1]))

 

use in measure

calculate(count(Table[Col1]), filter(Table1, Table[Col1] in except(all(table1[col1),all(table2[col1])))

 

In measure you might have to use all(Table) or allselected(Table)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Would I need to create a new table for each column to verify? I have about 30 columns.

Anonymous
Not applicable

Hi @Anonymous 

If you want to find the difference between two tables, you could use merge and append in power query editor.

TableA:

1.png

TableB:

2.png

Merge TableA and TableB Left anti.

3.png

Result:

5.png

Merge TableB and TableA Left anti.

Result:

6.png

Append:

7.png

Result:

8.png

If this reply still couldn't help you to solve this problem, please show me more details. You can provide a sample (your table A and tableB) to me and show me the result you want, it may be easier for me to understand your requirement.

You can download the pbix file from this link: How to validate that two data sources have identical fields and field values?

 

Best Regards,

Rico Zhou

 

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

 

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.