Where did the extra $320 come from?
Five invoices add to $500. A report built from the same invoices says $820. Follow one payment to see where the extra dollars entered.
Try the exerciseFind the first repeated amount
A repair shop bills once per invoice. Customers can pay in installments. A dashboard joins the invoices to their payments so the team can see cash collected. The sales total jumps. Trace I101 before you change the formula.
| Invoice | Billed | Receipt | Paid |
|---|---|---|---|
| I101 | $120 | R01 | $70 |
| I101 | $120 | R02 | $50 |
| I102 | $80 | R03 | $80 |
See a worked example
I101 represents $120 of billed work and $120 collected. Its two joined rows contribute $240 if you add the billed column after the join.
Count what one row stands for
An invoice amount belongs to one invoice. A receipt belongs to one payment. I103 also has two receipts, so its $200 is counted twice. Those two extra copies, $120 and $200, explain the full $320. Counting distinct invoice IDs repairs the count. It leaves the inflated dollar sum untouched.
Catch the tempting shortcut
A teammate proposes summing distinct dollar amounts. Imagine two separate customers each owe $80. That shortcut counts only one bill. Sum receipts by invoice ID first, then attach the payment totals to the original invoice list.