Year to date with TOTALYTD
TOTALYTD(expression, Date[Date]) evaluates the expression from 1 January to the last date visible in the cell. In a Q3 row that is January to September; in the year row, the whole year.
It is shorthand for CALCULATE(expression, DATESYTD(Date[Date])), the next lesson’s form. The date column must be the date column of the date table.
Your task
Write Sales YTD: the Sales Amount from the start of the year up to the end of the cell’s period.
About this exercise
You practise cumulative sales within a year with TOTALYTD. The exercise runs on a small bike-shop model with a Sales fact table and Product, Customer and Date dimensions, the same star schema in every lesson.
Your measure, Sales YTD, fills a Power BI-style matrix grouped by Date[Year] and Date[Quarter]. As in a real report, each cell evaluates the measure in its own filter context, and the subtotals and the grand total are evaluated again in theirs rather than added up. When you check your answer, every cell is compared with the expected value, wrong cells are marked, and the hint is about the mistake you made.
Measures that already exist in the model: Sales Amount. Reference them in square brackets, for example [Sales Amount].
Where you start
Sales YTD =The result to build
| Year › Quarter | Sales YTD |
|---|---|
| 2024 | 127,658.15 |
| Q1 | 24,861.05 |
| Q2 | 63,485.35 |
| Q3 | 98,398.15 |
| Q4 | 127,658.15 |
| 2025 | 129,736.30 |
| Q1 | 34,747.45 |
| Q2 | 59,862.55 |
| Q3 | 89,450.20 |
| Q4 | 129,736.30 |
| Total | 129,736.30 |
Last updated 10 November 2026
Opening the exercise…