Case 3: year-to-date figures

The monthly report shows the position since January next to every month. You calculate actual and variance year-to-date so it is clear whether the annual budget still holds.

In short: TOTALYTD([Total Actual], 'Date'[Date]) calculates [Total Actual] from 1 January to the end of the period in the row. It works with any measure, including the variance. It needs a complete date table related to Actual and Budget.

The situation

The matrix shows the months of 2026, filtered to the account type Expense. The division heads want to see not only the single month but where they stand in the year. An expensive June is no problem if January to May were under budget.

Task 1: actual year-to-date

Task The monthly report always shows the year-to-date figure next to the month. Create the measure "Actual YTD": [Total Actual] from 1 January to the end of the month in the row. Use TOTALYTD with the date column of the date table.

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.

The lesson on time intelligence shows how TOTALYTD and the other time functions work. The date column always comes from the date table, never from Actual: only there does every day appear exactly once, including days without entries. The lesson on the date table explains why that matters.

Task 2: variance year-to-date

Task An overrun in January may be made up again in February. Create the measure "Variance YTD": [Variance] since the start of the year.

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.

TOTALYTD takes any measure as its first expression, including one that combines two fact tables. The year-to-date variance equals actual year-to-date minus budget year-to-date.

Common mistakes

Date column from Actual

TOTALYTD([Total Actual], Actual[Date]) only returns the value of the month in every row, not the total since January. Power BI calculates it that way because Actual[Date] only knows the posted days. The exercise then shows a hint about the date table.

Year typed into the formula

CALCULATE([Total Actual], 'Date'[Year] = 2026) is not year-to-date but the whole year in every row. TOTALYTD follows the month of the row.

In real Power BI

  • If your fiscal year does not end on 31 December, give TOTALYTD the year-end as a third value, for example TOTALYTD([Total Actual], 'Date'[Date], "6/30") for a fiscal year ending in June. Write the date as month/day in quotes.
  • Future months have no actuals, yet TOTALYTD still shows the position to date there. To hide them, check first with IF(ISBLANK([Total Actual]), BLANK(), …).

Check your result

  • Task 1: Actual year-to-date is 1,253,762.40 in June and 2,545,703.10 in December, the annual value.
  • Task 2: The year-to-date variance is negative all year, so under budget: -14,807.60 in June, -20,576.90 in December.

Next: case 4, prior-year comparison

The 2026 costs next to those of 2025, and how many percent they changed.

Go to case 4

Back to case 2 or the course overview.

Write to us

Choose language

Select your preferred language