Purchases vs. Payments

Visualizing accounting data relationships with Power Query Joins

Real-world analogy

Two wedding guest lists

The bride's family and the groom's family each send a guest list. Every join is just a rule for whose invitations get printed.

  1. Two lists. Deepak and Esha appear on both. They are the “matching keys”.
  2. Inner join: only guests on both lists.
  3. Left anti: bride's side only, nobody the groom also invited.
  4. Right anti: groom's side only.
  5. Left outer: the whole bride's list, with groom's details where they match.
  6. Right outer: the whole groom's list.
  7. Full outer: everyone. A shared guest is printed once only if each list names that guest once.
Purchases Payments
Data Table Included in Result

Purchases (Left Table)

Payments (Right Table)

Result Table

Two traps a match can hide

A match is not a settlement. A ₹10,000 purchase with a ₹4,000 payment still matches in an inner join, yet ₹6,000 is outstanding. A join proves that a record exists. To test settlement, compare the amounts.

Duplicate keys multiply rows. Two payments against one purchase return two rows, so summing the purchase amount now shows ₹20,000. Check that the key is unique, or group the payments first. The same applies to the guest list: someone named twice on one list appears twice.