Case 1: budget vs. actual in Power BI
The cost report per cost center is the first report finance is asked for every month. You create the variance as a measure, calculate it as a percentage and make sure the budget is filtered correctly in the model in the first place.
In short: the variance is [Total Actual] - [Total Budget], the percentage variance DIVIDE([Variance], [Total Budget]). Both measures only work when Actual and Budget are related to the same dimensions. Otherwise cost center and account type only filter the actuals, and the budget shows the same total across all cost centers and accounts in every row.
The situation
Early July at a mid-sized manufacturer. Accounting delivers the posted amounts, the budget comes from the annual plan per month. The matrix shows the cost centers for June 2026, filtered to accounts with the account type Expense. Actual and budget are already side by side; the variance is missing.
| Term | Meaning in the report |
|---|---|
| Budget | the planned costs of the cost center for the month |
| Actual | the costs actually posted in the month |
| Variance | actual minus budget; for costs a positive value means more expensive than planned |
| Variance % | variance divided by budget; the base is always the budget |
Task 1: the variance
Task The cost report for June 2026 shows actual and budget for each cost center. Create the measure "Variance": [Total Actual] minus [Total Budget]. For costs, a positive value means more expensive than planned.
Actual 535 rows, 5 columns
| EntryID | Date | CostCenterID | AccountID | Amount |
|---|---|---|---|---|
| 1 | 23 Jan 2025 | 300 | 4000 | 88400 |
| 2 | 22 Jan 2025 | 300 | 4000 | 132600 |
| 3 | 12 Jan 2025 | 200 | 5000 | 36176 |
| 4 | 4 Jan 2025 | 600 | 5000 | 5253.5 |
| 5 | 21 Jan 2025 | 100 | 6000 | 13276.2 |
| 6 | 30 Jan 2025 | 100 | 6000 | 9613.8 |
| 7 | 16 Jan 2025 | 200 | 6000 | 49220 |
| 8 | 20 Jan 2025 | 300 | 6000 | 25440 |
| 9 | 29 Jan 2025 | 400 | 6000 | 12875 |
| 10 | 29 Jan 2025 | 500 | 6000 | 17205 |
| 11 | 10 Jan 2025 | 600 | 6000 | 5045.04 |
| 12 | 14 Jan 2025 | 600 | 6000 | 4656.96 |
Showing the first 12 of 535 rows.
Measures: [Total Actual]
Budget 432 rows, 4 columns
| Date | CostCenterID | AccountID | Amount |
|---|---|---|---|
| 1 Jan 2025 | 300 | 4000 | 221000 |
| 1 Jan 2025 | 200 | 5000 | 32300 |
| 1 Jan 2025 | 600 | 5000 | 5530 |
| 1 Jan 2025 | 100 | 6000 | 21000 |
| 1 Jan 2025 | 200 | 6000 | 46000 |
| 1 Jan 2025 | 300 | 6000 | 24000 |
| 1 Jan 2025 | 400 | 6000 | 12500 |
| 1 Jan 2025 | 500 | 6000 | 15500 |
| 1 Jan 2025 | 600 | 6000 | 9800 |
| 1 Jan 2025 | 100 | 6300 | 4200 |
| 1 Jan 2025 | 200 | 6300 | 7800 |
| 1 Jan 2025 | 600 | 6300 | 3600 |
Showing the first 12 of 432 rows.
Measures: [Total Budget]
CostCenter 6 rows, 3 columns
| CostCenterID | CostCenter | Division |
|---|---|---|
| 100 | Administration | Administration |
| 200 | Production | Operations |
| 300 | Sales | Sales |
| 400 | Marketing | Sales |
| 500 | IT | Administration |
| 600 | Warehouse | Operations |
Account 7 rows, 4 columns
| AccountID | Account | AccountType | AccountGroup |
|---|---|---|---|
| 4000 | Revenue | Income | Revenue |
| 5000 | Materials | Expense | Materials |
| 6000 | Salaries and Wages | Expense | Personnel |
| 6300 | Rent | Expense | Operating |
| 6500 | Travel | Expense | Operating |
| 6800 | Advertising | Expense | Operating |
| 6900 | Other Expenses | Expense | Operating |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
A measure may use other measures, as in the lesson on measures. The variance recalculates in every cell of the matrix: in the Production row with Production's entries, in the total row with all of them.
Task 2: the variance in percent
Task Create the measure "Variance %": the variance divided by the budget. Use DIVIDE so a cost center without a budget shows no error.
Actual 535 rows, 5 columns
| EntryID | Date | CostCenterID | AccountID | Amount |
|---|---|---|---|---|
| 1 | 23 Jan 2025 | 300 | 4000 | 88400 |
| 2 | 22 Jan 2025 | 300 | 4000 | 132600 |
| 3 | 12 Jan 2025 | 200 | 5000 | 36176 |
| 4 | 4 Jan 2025 | 600 | 5000 | 5253.5 |
| 5 | 21 Jan 2025 | 100 | 6000 | 13276.2 |
| 6 | 30 Jan 2025 | 100 | 6000 | 9613.8 |
| 7 | 16 Jan 2025 | 200 | 6000 | 49220 |
| 8 | 20 Jan 2025 | 300 | 6000 | 25440 |
| 9 | 29 Jan 2025 | 400 | 6000 | 12875 |
| 10 | 29 Jan 2025 | 500 | 6000 | 17205 |
| 11 | 10 Jan 2025 | 600 | 6000 | 5045.04 |
| 12 | 14 Jan 2025 | 600 | 6000 | 4656.96 |
Showing the first 12 of 535 rows.
Measures: [Total Actual], [Variance]
Budget 432 rows, 4 columns
| Date | CostCenterID | AccountID | Amount |
|---|---|---|---|
| 1 Jan 2025 | 300 | 4000 | 221000 |
| 1 Jan 2025 | 200 | 5000 | 32300 |
| 1 Jan 2025 | 600 | 5000 | 5530 |
| 1 Jan 2025 | 100 | 6000 | 21000 |
| 1 Jan 2025 | 200 | 6000 | 46000 |
| 1 Jan 2025 | 300 | 6000 | 24000 |
| 1 Jan 2025 | 400 | 6000 | 12500 |
| 1 Jan 2025 | 500 | 6000 | 15500 |
| 1 Jan 2025 | 600 | 6000 | 9800 |
| 1 Jan 2025 | 100 | 6300 | 4200 |
| 1 Jan 2025 | 200 | 6300 | 7800 |
| 1 Jan 2025 | 600 | 6300 | 3600 |
Showing the first 12 of 432 rows.
Measures: [Total Budget]
CostCenter 6 rows, 3 columns
| CostCenterID | CostCenter | Division |
|---|---|---|
| 100 | Administration | Administration |
| 200 | Production | Operations |
| 300 | Sales | Sales |
| 400 | Marketing | Sales |
| 500 | IT | Administration |
| 600 | Warehouse | Operations |
Account 7 rows, 4 columns
| AccountID | Account | AccountType | AccountGroup |
|---|---|---|---|
| 4000 | Revenue | Income | Revenue |
| 5000 | Materials | Expense | Materials |
| 6000 | Salaries and Wages | Expense | Personnel |
| 6300 | Rent | Expense | Operating |
| 6500 | Travel | Expense | Operating |
| 6800 | Advertising | Expense | Operating |
| 6900 | Other Expenses | Expense | Operating |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
With DIVIDE the cell stays empty when a cost center has no budget. With a slash you would get an error or infinity there. In Power BI you then set the measure's format to percentage under Measure tools.
Task 3: connecting the budget to the model
In real projects the budget often arrives later, as a table of its own from Excel. If it is only connected to the date, the report looks fine at first, but every cost center shows the same budget.
Task A colleague loaded the budget as a second fact table Budget and only connected it to Date. That is why every row shows the same budget. Connect Budget to CostCenter and to Account as well, each on the ID column.
Actual 535 rows, 5 columns
| EntryID | Date | CostCenterID | AccountID | Amount |
|---|---|---|---|---|
| 1 | 23 Jan 2025 | 300 | 4000 | 88400 |
| 2 | 22 Jan 2025 | 300 | 4000 | 132600 |
| 3 | 12 Jan 2025 | 200 | 5000 | 36176 |
| 4 | 4 Jan 2025 | 600 | 5000 | 5253.5 |
| 5 | 21 Jan 2025 | 100 | 6000 | 13276.2 |
| 6 | 30 Jan 2025 | 100 | 6000 | 9613.8 |
| 7 | 16 Jan 2025 | 200 | 6000 | 49220 |
| 8 | 20 Jan 2025 | 300 | 6000 | 25440 |
| 9 | 29 Jan 2025 | 400 | 6000 | 12875 |
| 10 | 29 Jan 2025 | 500 | 6000 | 17205 |
| 11 | 10 Jan 2025 | 600 | 6000 | 5045.04 |
| 12 | 14 Jan 2025 | 600 | 6000 | 4656.96 |
Showing the first 12 of 535 rows.
Measures: [Total Actual]
Budget 432 rows, 4 columns
| Date | CostCenterID | AccountID | Amount |
|---|---|---|---|
| 1 Jan 2025 | 300 | 4000 | 221000 |
| 1 Jan 2025 | 200 | 5000 | 32300 |
| 1 Jan 2025 | 600 | 5000 | 5530 |
| 1 Jan 2025 | 100 | 6000 | 21000 |
| 1 Jan 2025 | 200 | 6000 | 46000 |
| 1 Jan 2025 | 300 | 6000 | 24000 |
| 1 Jan 2025 | 400 | 6000 | 12500 |
| 1 Jan 2025 | 500 | 6000 | 15500 |
| 1 Jan 2025 | 600 | 6000 | 9800 |
| 1 Jan 2025 | 100 | 6300 | 4200 |
| 1 Jan 2025 | 200 | 6300 | 7800 |
| 1 Jan 2025 | 600 | 6300 | 3600 |
Showing the first 12 of 432 rows.
Measures: [Total Budget]
CostCenter 6 rows, 3 columns
| CostCenterID | CostCenter | Division |
|---|---|---|
| 100 | Administration | Administration |
| 200 | Production | Operations |
| 300 | Sales | Sales |
| 400 | Marketing | Sales |
| 500 | IT | Administration |
| 600 | Warehouse | Operations |
Account 7 rows, 4 columns
| AccountID | Account | AccountType | AccountGroup |
|---|---|---|---|
| 4000 | Revenue | Income | Revenue |
| 5000 | Materials | Expense | Materials |
| 6000 | Salaries and Wages | Expense | Personnel |
| 6300 | Rent | Expense | Operating |
| 6500 | Travel | Expense | Operating |
| 6800 | Advertising | Expense | Operating |
| 6900 | Other Expenses | Expense | Operating |
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
A dimension only filters the fact tables it has a relationship with. Budget therefore needs the same three relationships as Actual: to CostCenter, to Account and to Date, each many-to-one from Budget to the dimension.
Common mistakes
Percentage based on actual
Dividing by [Total Actual] instead of [Total Budget] gives different values, for example 9.8% instead of 10.9% for Sales. The exercise highlights the first cell that differs.
Columns instead of measures
SUM(Actual[Amount]) - SUM(Budget[Amount]) gives the same as the model answer. A calculated column in Actual would miss the budget in every row, because an entry has no budget value. Variances belong in measures.
Relationship direction mixed up
The cardinality is many-to-one: many budget rows per cost center, one row per cost center in the dimension. If you set up table 1 and table 2 the other way round, choose one-to-many; the result is the same.
In real Power BI
- Here the budget sits on the first of the month. If you show days instead of months, the whole monthly budget appears on day 1. That is right for monthly reports, not for daily analysis.
- If the budget comes as an Excel table with one column per month, bring it into long form in Power Query with Unpivot before it goes into the model.
- You build the same report with formulas in the Excel case budget vs. actual.
Check your result
- Task 1: In June, Production is 8,293.70 over budget and Marketing 523.00 under. The total is 13,353.10.
- Task 2: Sales 10.9%, Production 8.9%, IT 7.2%, Warehouse 0.2%.
- Task 3: With both relationships every cost center has its own budget, Production 93,490.00.
Back to the course overview.