Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello all,
I have two different data sources in two different databases / languages.
What I want to do is use Powerbi to automate & find which records are missing from database 2.
Database 1 will always contain all the records but database 2 will be missing records.
I have a attached a Pbix example here.
the data looks like this:
| database 1 - table: customers | database 2 - table: clientcustomers | |||
| Customer | CustomerID | Customer | CustomerID | |
| Walmart | 1 | Walmart | 1 | |
| Winco | 2 | Winco | 2 | |
| Target | 3 | Target | 3 | |
| Amazon | 4 | Amazon | 4 | |
| Costco | 5 | Costco | 5 | |
| Frenchs | 6 | |||
| Roses | 7 | |||
| Cash & Carry | 8 | |||
| Yokes | 9 | |||
and my desired output would show:
| Preferred Output (missing records from database 2) | |
| Customer | CustomerID |
| Frenchs | 6 |
| Roses | 7 |
| Cash & Carry | 8 |
| Yokes | 9 |
How can I accomplish this in Powerbi?
thank you!
Solved! Go to Solution.
Do an ANTI-JOIN in Power Query.
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"
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingDo an ANTI-JOIN in Power Query.
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"
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reportingthank you for the quick response!!!! I will try later tonight and follow up if I have anymore questions.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 50 | |
| 34 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 77 | |
| 41 | |
| 26 | |
| 26 |