Orders and product master report guide

Create a monthly product report from order CSV: master join, unmatched rows, and totals

Use product IDs to add names, keep matched and unmatched rows separate, and verify that the original total reconciles to the report plus the held amount.

Separate order and master roles

Orders contain order ID, product ID, quantity, and original line amount. The master contains product ID and name. Use the master to add names, not to overwrite historical order amounts with current prices.

InputKeyUse
Ordersorder_id / skuqty / line_total
Product masterskuname

Join by product ID

Keep string 001 distinct from numeric-looking 1. If the right key is duplicated, stop for review rather than selecting the first name. A left order must not become multiple rows.

Hold one unmatched order

SKU 999 has no product name. Keep O4, amount 50, and the reason in a separate unmatched table. State that it is excluded from the product report. Do not delete the order or invent a name.

OrdersSKUAmountResult
O1–O3001 / 002700reported
O499950unmatched / held

Aggregate quantity and original amount

Apples have quantity 5 and amount 500. Pears have quantity 1 and amount 200. These are synthetic ledger values, not a tax, return, or discount calculation. The report total is 700.

SKUNameQuantityOriginal amount
001りんご5500
002なし1200
Report total700

Reconcile 750 = 700 + 50

The input total is 750, the product report is 700, and the unmatched amount is 50. Confirm 750=700+50 before saving. This example does not prove tax, accounting, returns, or complete order coverage.

Carry the rules into next month

Save the key, selected columns, aggregation conditions, and unmatched policy. On rerun, check the master revision and unmatched list. Do not fill from last month’s values.