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
SteffanPE
Frequent Visitor

Difference between two sets of data

I have created identical pie charts from two different tables that should include the same data, in order to see if there are any discrepancies.

 

I'd like to find a way of showing which data is not shown within both tablesphoto.PNG, without having to export the data and then remove any duplicates etc.

 

 

2 ACCEPTED SOLUTIONS
AnthonyTilley
Solution Sage
Solution Sage

Provided the two tables have a unique ID colunm then you can use the Query editor to merge on a lefter anti join for both tables then combine these into 1 table 

 

step 1 - open query editor

step 2 click on the merge query dropdown in the home table a select merge queries as new
merge.png

Select your two tables and the id colunm in each then select Left Anti(rows only in first)
table1left.png

This will create a new table called Merge1 that has any values that appear in the first table but not in the second 

 

Step 3 - repeat these steps changing the top table to table 2 and the bottom to table 1 

table2left.png

this will create a merge2 table that has any values in table two that are not in table 1.

 

step 4 - merge these two merge tables into one final table

finalmerge.png

This Will create a final table merge3 that has all values that are missing in one of the tables

 

screen grab.png

you can then use this new table to create a list of any values that are missing in each table. as shown in the third table above we can see that 5 is missing from table 1

 

if you are also wanting to see if values are diffrent then create your key olunm using the value aswell 

for example above Create a concat colunm of ID and value (1-50) and use this in the merge if the ID 1 exsists in both but the value in one is 50 and in the other is 60 then you would get two distinct ids and this would mean that both would appear in the missing values table.

 

 





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

Proud to be a Super User!




View solution in original post

If this Post solved your isseus then please mark the reply as a solution





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
AnthonyTilley
Solution Sage
Solution Sage

Provided the two tables have a unique ID colunm then you can use the Query editor to merge on a lefter anti join for both tables then combine these into 1 table 

 

step 1 - open query editor

step 2 click on the merge query dropdown in the home table a select merge queries as new
merge.png

Select your two tables and the id colunm in each then select Left Anti(rows only in first)
table1left.png

This will create a new table called Merge1 that has any values that appear in the first table but not in the second 

 

Step 3 - repeat these steps changing the top table to table 2 and the bottom to table 1 

table2left.png

this will create a merge2 table that has any values in table two that are not in table 1.

 

step 4 - merge these two merge tables into one final table

finalmerge.png

This Will create a final table merge3 that has all values that are missing in one of the tables

 

screen grab.png

you can then use this new table to create a list of any values that are missing in each table. as shown in the third table above we can see that 5 is missing from table 1

 

if you are also wanting to see if values are diffrent then create your key olunm using the value aswell 

for example above Create a concat colunm of ID and value (1-50) and use this in the merge if the ID 1 exsists in both but the value in one is 50 and in the other is 60 then you would get two distinct ids and this would mean that both would appear in the missing values table.

 

 





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

Proud to be a Super User!




If this Post solved your isseus then please mark the reply as a solution





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

Proud to be a Super User!




it didn't quite resolve the matter, however did indicate a way of which i could do it.

 

I created two visual tables which included columns from both background tables which should be identical. I then filtered one of these columns to "only show blanks" in one visual, and the same filter against the other visual for the other column.

 

this gave me two lists of discrepencies which i could then merge.

 

thank you,

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.