The request

From Steven Clark, Regional Operations Director
Your goal
Read the broken matrix in the lesson and pick the cause.
What Steven gets, and why
The lesson
Every report builder meets this one eventually: a year-to-date column that is not running at all. The symptom is precise, and so is the cause.
What you are working in
This level is a question, not a formula. In this site’s practice DAX engine the same broken report can be reproduced by switching off the date-table mark; in Power BI Desktop the setting lives under Table tools → Mark as date table with the calendar selected, and Model view shows which column each relationship uses.
The broken matrix
This is Steven’s report, with the store’s real 2025 numbers:
| Year Month | Sales | Sales YTD |
|---|---|---|
| 2025-01 | $150,571 | $150,571 |
| 2025-02 | $99,903 | $99,903 |
| 2025-03 | $166,787 | $166,787 |
| 2025-04 | $189,734 | $189,734 |
| … | … | … |
| Total | $2,300,170 | $2,300,170 |
A working report shows $250,474 for February and $417,261 for March. The Total row is right in both, and that is the clue.
How TOTALYTD builds its filter
For the 2025-03 row:
- The cell’s filters are Year = 2025 (slicer) and Year Month = 2025-03 (row).
- TOTALYTD finds the last visible date, March 31, and builds the dates January 1 to March 31.
- CALCULATE puts those dates on
'Date'[Date].
Now the question is what happens to the other filters on the calendar. A new filter on
'Date'[Date] replaces an existing filter on that same column, but Year Month is a different
column. If its filter stays, the calendar keeps only rows that pass both: dates from January 1 to
March 31 and in 2025-03. That is March. The running total collapses to the month.
What marking the table changes
When a table is marked as the date table, Power BI treats a filter on its date column as a filter on the whole table: it removes the filters on Year, Month, Year Month and every other calendar column first. The YTD dates then stand alone, and February shows $250,474.
Power BI does the same thing automatically when the relationship to the facts uses a column of Date type, which is why many reports work without the mark. Steven’s calendar joins on an integer DateKey (20250331), so it gets no help, and the Total is the only cell with no Year Month filter to get in the way.
Two fixes
- Mark the table. Select the calendar, Table tools → Mark as date table, choose its Date column. Power BI checks the column has one row per day and no gaps. This fixes every time measure at once.
- Remove the filters in the measure.
CALCULATE([Sales], DATESYTD('Date'[Date]), REMOVEFILTERS('Date'))clears the calendar first and then applies the YTD dates. It works, but each measure needs it.
Other look-alike symptoms
- Same grand total on every row: the relationship is missing or inactive.
- Blank everywhere for last year: the calendar doesn’t cover the earlier year.
- YTD slightly short: the calendar has gaps, or uses the fact table’s dates.
Lantern lit!
Practised: mark as date tabletotalytddate tablefilter contexttroubleshooting
- Solved
- No hints
- First run
