KPI design, plan vs fact, variance and sales analysis
The performance-management toolkit — designing KPIs, comparing actuals with plan, decomposing variance into drivers, and structuring a sales analysis.
This lesson builds on: Business query patterns — period comparisons, customer-level analysis and cohorts, PivotTables, cleaning, reconciliation and variance analysis.
- Design a KPI tree that links company goals to operational drivers
- Produce plan-vs-fact tables with correct variance conventions
- Decompose a revenue variance into volume, price/mix and other effects
- Structure a sales analysis that moves from totals to drivers
KPI design — the KPI tree
Definition. A KPI (key performance indicator) is a metric tied to an objective, with a target and an owner. Business purpose. Focus attention and decisions on what drives results. Required data. Transactions, plan/targets, definitions agreed with owners.
Build a KPI tree: decompose the top metric into multiplicative or additive drivers until each leaf is something a team can act on.
Net revenue
├── Orders = Visitors/footfall × Conversion rate
└── Average order value = Units per order × Average net price
└── List price × (1 − Discount %)
At Orion Retail, 2025 revenue grew 12.5%: orders +12.7%, AOV −0.2% (Module 1). The tree tells the Commercial Director where growth came from (more orders, flat baskets) and where to look next (conversion or footfall?).
If nobody would act differently when a KPI turns red, it is a vanity metric. Remove it.
Plan vs fact
Formula. Variance = Fact − Plan; Variance % = Variance ÷ Plan; Attainment % = Fact ÷ Plan. Worked example (real 2025 data):
WITH fact AS (
SELECT o.store_id, SUM(oi.quantity * oi.unit_price * (1 - oi.discount_pct)) AS fact
FROM orders o JOIN order_items oi ON oi.order_id = o.order_id
WHERE o.status = 'completed' AND o.order_date >= '2025-01-01' AND o.order_date < '2026-01-01'
GROUP BY o.store_id),
plan AS (SELECT store_id, SUM(target_revenue) AS plan FROM sales_targets WHERE year_month LIKE '2025%' GROUP BY store_id)
SELECT s.store_name, ROUND(p.plan) AS plan, ROUND(f.fact) AS fact,
ROUND(f.fact - p.plan) AS variance, ROUND(100.0 * f.fact / p.plan, 1) AS attainment_pct
FROM plan p JOIN fact f ON f.store_id = p.store_id JOIN stores s ON s.store_id = p.store_id
ORDER BY attainment_pct;| store_name | plan | fact | variance | attainment_pct |
|---|---|---|---|---|
| Orion Ankara | 124900 | 118288 | -6612 | 94.7 |
| Orion Tbilisi | 103200 | 99884 | -3316 | 96.8 |
| Orion Baku Central | 182600 | 178119 | -4481 | 97.5 |
| Orion Online | 246600 | 241793 | -4807 | 98.1 |
| Orion Ganja | 88900 | 89241 | 341 | 100.4 |
| Orion Baku Riverside | 117800 | 123763 | 5963 | 105.1 |
| Orion Istanbul Kadikoy | 195800 | 213813 | 18013 | 109.2 |
| Orion Sumqayit | 71900 | 79626 | 7726 | 110.7 |
Interpretation. Network attainment ≈ 101%, but four stores are below 100%. Ankara has the largest shortfall in % terms; Online the largest in absolute terms after Ankara? — read the variance column: decisions should weigh both % (performance) and absolute size (money). Decisions. Review Ankara's plan assumptions (first full year — was the plan too aggressive?), not only its execution.
Variance decomposition (volume vs price/mix)
Definition. Splitting a revenue difference into the part caused by volume (more/fewer units or orders) and the part caused by price/mix (value per unit/order). Formula (order-based):
- Volume effect = (Orders₁ − Orders₀) × AOV₀
- Rate (AOV) effect = (AOV₁ − AOV₀) × Orders₁
- Volume effect + Rate effect = Revenue₁ − Revenue₀ (exactly)
Worked example — Orion 2025 vs 2024: Orders₀ = 11,277, AOV₀ = 90.24; Orders₁ = 12,713, AOV₁ = 90.03.
- Volume = (12,713 − 11,277) × 90.24 = 1,436 × 90.24 ≈ +129,600
- AOV effect = (90.03 − 90.24) × 12,713 ≈ −2,700
- Total ≈ +126,900 = 1,144,527 − 1,017,608 ✓
Interpretation. All growth came from more orders; slightly smaller baskets cost ~2.7k. Common mistake. Computing both effects at old (or both at new) values leaves an unexplained "interaction" remainder; use the sequential method above so the parts add up exactly.
Sales analysis structure
A professional sales analysis moves top-down:
- Headline: revenue, growth, vs plan (one sentence).
- Trend & seasonality: monthly YoY.
- Decomposition: orders × AOV; units × price; discount impact.
- Breakdowns: channel, store (LFL vs new), category, customer segment.
- Concentration: top products/customers share (Pareto).
- Drivers & anomalies: campaigns, stock-outs, price changes.
- So what: 3 actions with expected impact.
Practice
Orders went from 1,000 to 1,100 and average order value from 50 to 48. Using the sequential method, what is the volume effect ((Orders₁ − Orders₀) × AOV₀)?
A store's plan is 124,900 and its fact is 118,288. What is attainment % (1 decimal)?
Which KPI pair best balances a call-centre team that is measured on calls handled per hour?
Summary
- KPI trees connect results to actionable drivers; every KPI needs a decision.
- Variance = fact − plan; report % and absolute size; state the convention.
- Volume/rate decomposition explains why revenue changed and must add up exactly.
- Structure sales analysis from headline to drivers to actions.