COMMON GOODSSales and returns explorerA fictional company. A real analytical question.Source
Loading application modules…

Sales-cohort analysis · USD

What did you keep?

Revenue, not profit. These exports have no product, marketing or handling costs. Net sales measures the merchandise revenue retained after observed returns.

Gross sales

—

—

Returned revenue

—

—

Net sales

—

Gross less returned revenue

Returned-unit rate

—

—

01 / Revenue quality

Where returns change the picture

Bars show gross sales split into revenue kept and revenue returned. Sorted by dollars returned. Export includes every matching group.

Kept (net)Returned

Revenue behind the chart · whole USD; exports retain cents
GroupGrossReturnedNetUnit return rateGross → net rank
File format, calculations and limits

Know the boundaries

The file contract

UTF-8 CSV with these exact headers in any order. Identifiers and labels are trimmed and case-sensitive. Quoted commas and escaped quotes work.

sales.csv

line_id,sale_date,product,channel,units,unit_price_usd

One unique order line. Units: whole number 1–10,000. Unit price: USD 0–10,000, at most two decimals, without a $ sign. Price is the merchandise amount before returns.

returns.csv

return_id,line_id,return_date,units

One unique return event linked to a sales line. Multiple events may reference that line. A header-only file means no returns. Returned units cannot exceed units sold.

Dates: real YYYY-MM-DD dates, 2000–2099. A return cannot precede its sale. Labels and IDs: 1–100 characters. No duplicate IDs, extra columns or unmatched returns. Validation errors leave the previous dataset intact.

What this view can—and cannot—tell you

Refunds equal returned units × original unit price. Revenue excludes taxes, shipping, discounts not reflected in price, return fees and costs. This is not profit or refund-month cash flow. Files must cover the same sales universe; no tool can detect returns omitted from an export.

“Observed through” is the latest supplied sale or return date, not proof that returns are complete. All months use returns present in the files. Ranks compare visible groups; ties share a rank. Unit rate = returned units ÷ sold units. A zero denominator is shown as “n/a”. Money is calculated in integer cents; totals show whole USD, unit prices and CSV exports retain cents.

Try the student investigation and file-correction task