Sales variance

Variance Analysis

Maps the sales file, runs standard and root-cause sales variance analysis, and explains the business drivers.

Use it on CSV, TSV, PSV or Excel sales files. It calculates period deltas first, then adds price-volume-mix, net sales, discount, COGS, margin and root-cause variance views when the mapped columns support them.

From sales data to variance drivers

The workflow prepares reviewable files and highlights movements, caveats and main drivers.

Inspect

Creates inspection.json and suggested_recipe.json from the sales file.

Calculate

The scripts always calculate the selected period comparison, then add price-volume-mix, discount, COGS, margin and root-cause variance analysis when the mapped data supports them.

Explain

Turns the audit outputs into a concise accountant review, highlighting the largest reconciled drivers and caveats.

For root-cause analysis, the calculation starts at the lowest mapped grain, builds combinations of the selected dimensions, removes overlapping parent-child rows, then writes each remaining driver as a variance type and amount.

Ask for Variance Analysis on a sales file. The plugin runs the complete package automatically and only asks when a required mapping cannot be inferred.

Standard variance bridge

When no dimension is specified, the plugin draws a normal bridge from opening total to closing total by variance component only.

No-dimension bridge The rows are Price, Volume, Mix and Other. They are variance components, not product, region, customer or another business dimension.
Small multiples by Productline Road Bikes PL 13.2M Price +0.8M Units +0.4M Mix +0.3M Other -0.1M AC 14.6M Mountain Bikes PL 8.4M Price +0.5M Units +0.3M Mix +0.2M Other -0.1M AC 9.3M Touring Bikes PL 4.1M Price +0.3M Units +0.2M Mix +0.1M Other +0.1M AC 4.8M
Small multiples by Productline Each panel repeats the same Price / Units / Mix / Other bridge for one Productline item. The dimension splits panels, not the rows inside them.

How root-cause variance works

Root-cause variance is a sequential residual bridge. It is not a normal single-dimension breakdown.

The analysis sequence

The plugin builds all supported dimension combinations, ranks the largest remaining driver, removes the overlap from the remaining candidates, reranks, and repeats.

  • Start from the opening total and the full candidate universe: product, region, customer and combinations at different depths.
  • Pick the largest remaining explanatory row, such as Bikes, Bikes / Road, or Bikes / Road / Australia.
  • Subtract or account for that selected slice so parent and child rows are not double-counted.
  • Rerank what is left; the next row can come from another dimension or from a deeper or shallower level.
  • Stop after the selected sequence, put the residual in Other, and end at the closing total.
Product-line bridge This example explains the movement through Road, Mountain and Touring Bikes. It is still a bridge, but all rows use the same dimension pair.
Mixed root-cause bridge The selected rows move between product line, product line plus region, and category plus region. This is the variable-dimension behavior: each row is the next largest residual driver, not another row from one fixed grouping.

Reviewable outputs

Every run leaves files that can be inspected, rerun and challenged.

  • inspection.json
  • suggested_recipe.json
  • variance_results.csv
  • variance_results.xlsx (when available)
  • variance_audit.json
  • variance_summary.md
  • waterfall.png
  • waterfall_small_multiples.png
  • codex_business_analysis.md
  • used_recipe.json
  • root_cause_bridge.csv
  • root_cause_sweep_summary.csv
  • root_cause_client_report.docx

Root-Cause Variance Analysis

This analysis explains the movement from baseline to comparison with driver rows built from dimension combinations, such as product, customer or region.

Plugin package

The Pro Accounting Plugin Pack includes Variance Analysis; then run it on your sales file.

Download plugin