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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Compare two tables and return missing codes

I need to check which codes(CPF) are missing in the MON_VG_20230723_000043_Full table, when I compare it with the Snapshot_Beneficiarios_Corte202307_Carga202307_16082023-102500 table.

 

edumach_0-1692198113266.png

 

The result should be a list of the codes that are missing from the MON_VG_20230723_000043_Full table

 

 

1 ACCEPTED SOLUTION
AbhinavJoshi
Responsive Resident
Responsive Resident

Hello @Anonymous, One way to achieve this is using merge queries in Power Query Editor. Merge your two tables based on the Code that exists on the both table. Once it is merged based on the key, click on keep nulls on the Snapshot_Beneficiarios_Corte202307_Carga202307_16082023 table. It will give you the codes that doesn't exist on the Snapshot_Beneficiarios_Corte202307_Carga202307_16082023 but exists on the MON_VG_20230723_000043_Full  table. I hope it helps! 

 

Thanks,

Abhinav

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@AbhinavJoshi obrigado

AbhinavJoshi
Responsive Resident
Responsive Resident

Hello @Anonymous, One way to achieve this is using merge queries in Power Query Editor. Merge your two tables based on the Code that exists on the both table. Once it is merged based on the key, click on keep nulls on the Snapshot_Beneficiarios_Corte202307_Carga202307_16082023 table. It will give you the codes that doesn't exist on the Snapshot_Beneficiarios_Corte202307_Carga202307_16082023 but exists on the MON_VG_20230723_000043_Full  table. I hope it helps! 

 

Thanks,

Abhinav

Anonymous
Not applicable

@mussaenda This is just a sampling, there are many codes, the table has 1.5 million records

Hi @Anonymous ,

 

I understand. That is hy you need a masterlist of your codes.

You can append the codes as new table and remove the duplicates the use it as your lookup table.

 

This just one of the ways.

mussaenda
Community Champion
Community Champion

Hi @Anonymous ,

 

my suggestion is to have a masterlist of all the codes and then you can lookup the values

from your provided data, the missing codes are ...0006 and ...0007, right?

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.