Explain Extra Power Query Rows After Expanding a Merge
A left merge can preserve every original record and still produce more rows after expansion. The important question is how many right-hand records match each key, rather than whether the command finished without an error.
Prepare a small copy. Let the left table contain one line for Key K17 with Quantity 4. Let the right table contain two K17 rows, one for Shelf A and one for Shelf B. If both locations are legitimate, the key describes a relationship with several matches.
Follow the nested result
Power Query's Home, Merge Queries joins selected columns from two tables. Match their data types; for multiple key columns, select them in corresponding order. A left outer join keeps the left table's rows and matches from the right. The merge adds a column containing related tables. Expanding those nested tables can produce multiple output rows.
Inspect K17 before and after expanding the location field. Two resulting rows are consistent with the two matches. The left quantity can now appear beside both locations; summing it would give eight without establishing that eight items exist. Expansion has exposed the relationship, not allocated the quantity between shelves.
Decide whether the relationship is intended
If the report requires one location per key, inspect why the reference table has two. They might be an outdated entry and a current entry, or the supposed key might omit a necessary field. Choose an authoritative rule or complete key based on the records' meaning.
If multiple locations are intended, keep them and redesign the calculation at the appropriate level. Do not remove duplicates from the expanded output solely to restore the earlier row count; that could discard genuine location information.
Test a key with one match, a key with several and a key with no match. Compare the resulting record counts and inspect the associated values. For the full report, account for increases by the matching records that caused them, and reconcile any left-side totals before using the expanded table downstream. Retain the original tables and the declared key rule with the workbook.
Sources: Microsoft: merge queries; Microsoft: expand nested tables.