Variance analysis formulas for EPM: actual vs. budget, forecast and prior year
Variance analysis is the first thing finance asks of a new Planning application and the last thing to get right. The arithmetic is simple. The hard parts are signs, missing values, currencies and explaining why revenue moved. This guide covers each, with Essbase formulas you can adapt. Member names are examples.
The basic variance and its sign
A variance is the difference between two scenarios: actual against budget, actual against forecast, forecast against budget, or this year against last year.
The trap is the sign. For revenue, actual above budget is favourable. For costs, actual above budget is unfavourable.
If the variance is always Actual - Budget, readers have to remember which accounts are which, and someone will get it
wrong in a board pack.
Essbase solves this with the expense reporting tag on accounts and two functions that respect it:
/* Dynamic calc member in the Scenario dimension */
"Act_vs_Bud" = @VAR("Actual", "Plan");
For a revenue account this gives Actual - Plan. For an account tagged as an expense, it flips the sign, so a positive
variance always means favourable. Tag the accounts correctly once and every variance member follows.
Variance percentages that don't break
A percentage variance divides by the comparison scenario, so zeros and missing values need handling:
"Act_vs_Bud_Pct" (
IF ("Plan" == #MISSING OR "Plan" == 0)
"Act_vs_Bud_Pct" = #MISSING;
ELSE
"Act_vs_Bud_Pct" = @VARPER("Actual", "Plan");
ENDIF
)
@VARPER respects the expense tag like @VAR. Returning #MISSING when there's no plan is a decision, not a technical
detail: some teams prefer to show 100%, others a blank. Agree it with finance and record it.
Make percentage members dynamic calc so they're computed from the aggregated values at each level. A stored percentage that gets aggregated produces a sum of percentages, which is meaningless.
Where variance members live
Two common designs:
- In the Scenario dimension (dynamic calc members such as
Act_vs_Bud,Act_vs_Fcst,Act_vs_PY). One formula covers every account, entity and period. This is usually the simplest. - In a separate Variance dimension or in the Account dimension. Useful when you need many comparison types, but more members to maintain.
Whichever you choose, check how the variance members behave on forms with dynamic upper levels (in a hybrid cube) and on percentage accounts, where solve order decides which formula is calculated last.
Forecast and prior-year comparisons
Forecast variance works the same way, with one subtlety: in a rolling forecast, the forecast scenario usually holds actuals for closed months. Comparing actual with forecast for a closed month then shows zero, which is correct but surprises people. Label it clearly, or compare against the forecast as it was submitted at the start of the period (a separate version).
Prior-year comparisons reference the Years dimension, typically through a substitution variable:
"Act_vs_PY" = "Actual" - "Actual"->&PriorYear;
@VAR takes two members of the same dimension, so a cross-year difference like this one doesn't get the expense sign
flip for free. Either handle the sign in the formula (for example with @ISACCTYPE(EXPENSE) in an IF), or keep a
prior-year scenario member that a report can compare with @VAR. Keep &PriorYear in step with &CurrentYear in the year-end roll-forward checklist. A stale substitution variable
silently compares against the wrong year.
Variance in more than one currency
When entities report in different currencies, the total variance in the reporting currency mixes two effects: the business performed differently, and exchange rates moved. Split them with a constant-currency view:
| Measure | Formula |
|---|---|
| Total variance | Actual at actual rates − Plan |
| FX variance | Actual at actual rates − Actual at plan rates |
| Operating variance | Actual at plan rates − Plan |
FX and operating variance add up to the total. "Actual at plan rates" is usually a scenario (or version) where actuals are translated with the plan's exchange rates, by the currency conversion rule or a calc script. Document which rates each scenario uses, because "which rate was this translated at?" is the first question in every variance review.
Price, volume and mix: a worked example
When revenue misses budget, finance wants to know whether it was price, quantity or the mix of products sold. A fictive example with two products:
| Budget units | Budget price | Budget revenue | Actual units | Actual price | Actual revenue | |
|---|---|---|---|---|---|---|
| Product A | 100 | 10.00 | 1,000 | 120 | 9.50 | 1,140 |
| Product B | 50 | 20.00 | 1,000 | 40 | 21.00 | 840 |
| Total | 150 | 2,000 | 160 | 1,980 |
Revenue is 20 below budget. Split it per product:
- Price variance = (actual price − budget price) × actual units. A: (9.50 − 10.00) × 120 = −60. B: (21.00 − 20.00) × 40 = +40. Total −20.
- Quantity variance = (actual units − budget units) × budget price. A: (120 − 100) × 10 = +200. B: (40 − 50) × 20 = −200. Total 0.
Price and quantity add up to the −20. The quantity variance of zero hides something, though: the company sold 10 more units in total, but more of the cheaper product. Split quantity into volume and mix:
- Volume variance = (actual total units × budget mix − budget units) × budget price. Budget mix is A 66.7%, B 33.3%. A: (106.7 − 100) × 10 = +66.7. B: (53.3 − 50) × 20 = +66.7. Total +133.3.
- Mix variance = (actual units − actual total units × budget mix) × budget price. A: (120 − 106.7) × 10 = +133.3. B: (40 − 53.3) × 20 = −266.7. Total −133.3.
So the story is: selling more units was worth +133, the shift towards the cheaper product cost −133, and pricing cost −20. That's a far more useful conversation than "revenue was 20 below budget".
In a calc script, the price and quantity parts are calculated at level 0, where units and prices are meaningful, then aggregated:
FIX("FY27", "Final", "Variance", @RELATIVE("YearTotal", 0), @RELATIVE("Total_Entity", 0), @RELATIVE("Total_Product", 0))
"Price_Var" = ("Avg_Price"->"Actual" - "Avg_Price"->"Plan") * "Units"->"Actual";
"Qty_Var" = ("Units"->"Actual" - "Units"->"Plan") * "Avg_Price"->"Plan";
ENDFIX
FIX("FY27", "Final", "Variance")
AGG("Entity", "Product");
ENDFIX
This assumes blocks exist for the Variance scenario. If they don't, create them first, for example with a DATACOPY;
the business rule errors guide explains why. Mix and volume need the
totals and the budget mix, so they're usually calculated in a second pass or as dynamic members at the product total.
Watch new products with no budget: their budget price is #MISSING, so the quantity variance comes out missing too.
Decide how to show them (often as a separate "new products" line) and record the decision.
Making variance readable
- Show favourable and unfavourable consistently. With expense tags in place, a positive variance is always good, so colour and arrows can follow the sign.
- Show materiality. A 40% variance on a 500 account is noise; a 2% variance on payroll may not be. Thresholds in both amount and percentage keep reviews focused.
- Put the explanation next to the number. Variance commentary entered with the data is worth more than a slide written afterwards.
Where EPM Agent fits
Sign conventions, how missing plans are shown, which rates each scenario uses: every variance design is a set of decisions. EPM Agent keeps those decisions as reviewed facts with their sources, and its build agents write the rules and reports from them, so the design document, the formulas and the reports agree. See how project knowledge works, or the calc script functions reference.