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.

TermMeaning in the report
Budgetthe planned costs of the cost center for the month
Actualthe costs actually posted in the month
Varianceactual 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
EntryIDDateCostCenterIDAccountIDAmount
123 Jan 2025300400088400
222 Jan 20253004000132600
312 Jan 2025200500036176
44 Jan 202560050005253.5
521 Jan 2025100600013276.2
630 Jan 202510060009613.8
716 Jan 2025200600049220
820 Jan 2025300600025440
929 Jan 2025400600012875
1029 Jan 2025500600017205
1110 Jan 202560060005045.04
1214 Jan 202560060004656.96

Showing the first 12 of 535 rows.

Measures: [Total Actual]

Budget 432 rows, 4 columns
DateCostCenterIDAccountIDAmount
1 Jan 20253004000221000
1 Jan 2025200500032300
1 Jan 202560050005530
1 Jan 2025100600021000
1 Jan 2025200600046000
1 Jan 2025300600024000
1 Jan 2025400600012500
1 Jan 2025500600015500
1 Jan 202560060009800
1 Jan 202510063004200
1 Jan 202520063007800
1 Jan 202560063003600

Showing the first 12 of 432 rows.

Measures: [Total Budget]

CostCenter 6 rows, 3 columns
CostCenterIDCostCenterDivision
100AdministrationAdministration
200ProductionOperations
300SalesSales
400MarketingSales
500ITAdministration
600WarehouseOperations
Account 7 rows, 4 columns
AccountIDAccountAccountTypeAccountGroup
4000RevenueIncomeRevenue
5000MaterialsExpenseMaterials
6000Salaries and WagesExpensePersonnel
6300RentExpenseOperating
6500TravelExpenseOperating
6800AdvertisingExpenseOperating
6900Other ExpensesExpenseOperating
Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

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
EntryIDDateCostCenterIDAccountIDAmount
123 Jan 2025300400088400
222 Jan 20253004000132600
312 Jan 2025200500036176
44 Jan 202560050005253.5
521 Jan 2025100600013276.2
630 Jan 202510060009613.8
716 Jan 2025200600049220
820 Jan 2025300600025440
929 Jan 2025400600012875
1029 Jan 2025500600017205
1110 Jan 202560060005045.04
1214 Jan 202560060004656.96

Showing the first 12 of 535 rows.

Measures: [Total Actual], [Variance]

Budget 432 rows, 4 columns
DateCostCenterIDAccountIDAmount
1 Jan 20253004000221000
1 Jan 2025200500032300
1 Jan 202560050005530
1 Jan 2025100600021000
1 Jan 2025200600046000
1 Jan 2025300600024000
1 Jan 2025400600012500
1 Jan 2025500600015500
1 Jan 202560060009800
1 Jan 202510063004200
1 Jan 202520063007800
1 Jan 202560063003600

Showing the first 12 of 432 rows.

Measures: [Total Budget]

CostCenter 6 rows, 3 columns
CostCenterIDCostCenterDivision
100AdministrationAdministration
200ProductionOperations
300SalesSales
400MarketingSales
500ITAdministration
600WarehouseOperations
Account 7 rows, 4 columns
AccountIDAccountAccountTypeAccountGroup
4000RevenueIncomeRevenue
5000MaterialsExpenseMaterials
6000Salaries and WagesExpensePersonnel
6300RentExpenseOperating
6500TravelExpenseOperating
6800AdvertisingExpenseOperating
6900Other ExpensesExpenseOperating
Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

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
EntryIDDateCostCenterIDAccountIDAmount
123 Jan 2025300400088400
222 Jan 20253004000132600
312 Jan 2025200500036176
44 Jan 202560050005253.5
521 Jan 2025100600013276.2
630 Jan 202510060009613.8
716 Jan 2025200600049220
820 Jan 2025300600025440
929 Jan 2025400600012875
1029 Jan 2025500600017205
1110 Jan 202560060005045.04
1214 Jan 202560060004656.96

Showing the first 12 of 535 rows.

Measures: [Total Actual]

Budget 432 rows, 4 columns
DateCostCenterIDAccountIDAmount
1 Jan 20253004000221000
1 Jan 2025200500032300
1 Jan 202560050005530
1 Jan 2025100600021000
1 Jan 2025200600046000
1 Jan 2025300600024000
1 Jan 2025400600012500
1 Jan 2025500600015500
1 Jan 202560060009800
1 Jan 202510063004200
1 Jan 202520063007800
1 Jan 202560063003600

Showing the first 12 of 432 rows.

Measures: [Total Budget]

CostCenter 6 rows, 3 columns
CostCenterIDCostCenterDivision
100AdministrationAdministration
200ProductionOperations
300SalesSales
400MarketingSales
500ITAdministration
600WarehouseOperations
Account 7 rows, 4 columns
AccountIDAccountAccountTypeAccountGroup
4000RevenueIncomeRevenue
5000MaterialsExpenseMaterials
6000Salaries and WagesExpensePersonnel
6300RentExpenseOperating
6500TravelExpenseOperating
6800AdvertisingExpenseOperating
6900Other ExpensesExpenseOperating
Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

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.

Next: case 2, income statement

Separate income and expenses from the same entries table and show profit with the profit margin.

Go to case 2

Back to the course overview.

Write to us

Choose language

Select your preferred language