rows.com

Missing data after a merge? Let's find those 7,000 lost values.

When merging large tables in Power Query, it's not uncommon to encounter discrepancies, such as a sum that is approximately 7,000 less than expected.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Missing data after a merge almost always comes down to join types and mismatched keys, but chasing a 7,000-value gap in Power Query doesn't require guesswork. The frustration here is familiar: you're working with large datasets, the merge runs without errors, yet the numbers don't line up. That 7,000-unit discrepancy isn't a mystery, it's a debugging path with clear signposts, provided you step back from panic and examine the joins systematically.

The most common culprit is using an inner join when you need a left outer join. Power Query defaults to inner joins for many merges, which silently discards rows from the first table that don't have matching keys in the second. If your original table sums to 100,000 and your merged result sums to 93,000, those 7,000 lost values are likely rows in your primary table that found no partner. The fix isn't complicated: change the join kind to "Left Outer" in the Merge dialog. But identifying which rows were dropped requires Post-merge diagnostics. Use the "Table.Profile" function or add a custom column counting nulls in key fields from the second table, rows with nulls in that column are the orphans.

A second reason is key mismatch beneath the surface. Spaces, inconsistent formatting, or data type differences, number stored as text, trailing spaces from imports, cause "matching" keys to fail silently. You can expose these by duplicating the original table before the merge, then applying a "Remove Duplicates" on the key column. Compare the result with the merged table's unique keys. The difference reveals rows that had no match, even if they looked identical. For large datasets, writing a simple query that uses "Table.SelectRows" to filter for non-matching keys is faster than manual scanning.

Finally, check whether your aggregation introduces the error. Summing a column after a merge may include duplicate rows if the second table had multiple matches for a single key. Power Query expands those rows, inflating the count in ways that mask the missing 7,000. Validate by running a count of distinct keys in both tables before merging. If the counts differ, correct the join logic first. Debugging merges is mechanical: walk from join type to key integrity to expansion behavior. You will find those 7,000 values in the gap between what you assumed matched and what actually did.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

I’m merging two large tables in Power Query, but I’m running into a data accuracy issue.

After the merge, I noticed that the sum of a specific column is about 7,000 less than the total in the original table. So it looks like some data is missing during the merge.

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community