Budget actual and margin
Quick answer — compare like with like
Budget variance compares actual performance with an approved plan at common grain, currency and period. Use a named scenario, explicit favorable/unfavorable convention and a ratio-of-sums margin. In this lab, positive favorable variance means better than budget; it is not always actual minus budget for displayed expenses.
Define measures and scenario scope
Use the single-entity USD model from the previous lesson. Add Scenario with Approved and Stretch, relating only to Budget. Select exactly one scenario; no comparison to summed plans. These native DAX snippets are staged and unexecuted. They intentionally remove account filters to define fixed company-level KPIs; do not use them as generic account-row measures. Month filters remain in force.
Revenue = -CALCULATE(SUM(Actual[SignedUSD]), REMOVEFILTERS(Accounts), Accounts[Class] = "Revenue")COGS = CALCULATE(SUM(Actual[SignedUSD]), REMOVEFILTERS(Accounts), Accounts[Class] = "COGS")Opex = CALCULATE(SUM(Actual[SignedUSD]), REMOVEFILTERS(Accounts), Accounts[Class] = "Opex")Gross Profit = [Revenue] - [COGS]Operating Profit = [Gross Profit] - [Opex]Gross Margin = DIVIDE([Gross Profit], [Revenue])Budget Profit = IF(HASONEVALUE(Scenario[Scenario]), -CALCULATE(SUM(Budget[SignedUSD]), REMOVEFILTERS(Accounts)))Profit Variance = IF(NOT ISBLANK([Budget Profit]), [Operating Profit] - [Budget Profit])Budget contains only the three P&L leaf accounts. Upstream completeness gates must pass; otherwise do not show KPI values. This scope assumes both July and August are fully loaded; do not silently include June opening or partial months in a budget variance.
Worked example 1 — build a favorable variance bridge
July actual revenue 200, COGS 80, Opex 40, profit 80. Approved plan revenue 210, COGS 90, Opex 45, profit 75. Revenue variance -10; COGS favorable variance +10 (budget cost minus actual cost); Opex +5; sum +5. August actual profit 40 vs approved 50, variance -10. Across both months, actual revenue 350, expense 230, profit 120; approved revenue 370, expense 245, profit 125. Bridge -20 revenue +15 COGS +0 Opex = -5 profit. Display "5 unfavorable" with explicit USD units.
Worked example 2 — margin and scenario boundaries
July gross margin 120/200 = 60%; August 80/150 = 53.33%. Total 200/350 = 57.14%, not their simple average (56.67%). Approved gross margin = 205/370 = 55.41%; difference about 1.74 percentage points. Use DIVIDE with blank when revenue is zero or missing, rather than reporting a false 0%. Stretch budget operating profit is 165 across both months, so actual is 45 unfavorable. Comparing both plans simultaneously is undefined; do not aggregate independent scenarios.
Management reporting and quality controls
Use a matrix for account line items with a separate metric selector or cards for fixed KPIs. Sort the account hierarchy in business order. Label scenario, currency, period and source version, and annotate what is missing. Use a waterfall bridge only if the contributions reconcile to total variance. A favorable cost variance can reflect delayed spending rather than improved efficiency. Budget is a planning assumption, not a prediction. Avoid false causal claims and do not publish without an approved close and reconciliation.
Practice and references
Calculate August favorable revenue, COGS and Opex variances against Approved and compare with the total. Switch to Stretch for July and calculate profit variance. Explain why summing both plans is invalid. See financial analysis in Dynamics and financial reporting overview. Run the lab verifier for independent arithmetic; native DAX NOT RUN.