Forum Discussion
Find missing records between two tables
- 6 years ago
Do an ANTI-JOIN in Power Query.
- Select the first table. You can create a reference to that table if you don't want to distrupt that table first.
- Select the Merge button on the Home Ribbon
- Configure the dialog box as below. My Database 1 Customers (2) is because I created a reference.
It returns this:
If you want to see the M code doing this, create a blank query and put this code in:
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Donelet Source = #"Database 1 - Customers", #"Merged Queries" = Table.NestedJoin(Source, {"CustomerID"}, #"database 2 - clientcustomers", {"CustomerID"}, "database 2 - clientcustomers", JoinKind.LeftAnti), #"Removed Columns" = Table.RemoveColumns(#"Merged Queries",{"database 2 - clientcustomers"}) in #"Removed Columns"
Do an ANTI-JOIN in Power Query.
- Select the first table. You can create a reference to that table if you don't want to distrupt that table first.
- Select the Merge button on the Home Ribbon
- Configure the dialog box as below. My Database 1 Customers (2) is because I created a reference.
It returns this:
If you want to see the M code doing this, create a blank query and put this code in:
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
let
Source = #"Database 1 - Customers",
#"Merged Queries" = Table.NestedJoin(Source, {"CustomerID"}, #"database 2 - clientcustomers", {"CustomerID"}, "database 2 - clientcustomers", JoinKind.LeftAnti),
#"Removed Columns" = Table.RemoveColumns(#"Merged Queries",{"database 2 - clientcustomers"})
in
#"Removed Columns"thank you for the quick response!!!! I will try later tonight and follow up if I have anymore questions.