Why a date table matters: sales for one year
Meet the Date table that powers every time calculation, and use it to pull out one year’s sales next to the all-time total.
You will learn to
- Explain why reports slice time with a Date table
- Filter a measure to one year with CALCULATE
- Predict how a year filter combines with a month row
How it works
A **date table** has exactly one row for every day, with no gaps: here `'Date'` runs from 1 Jan 2024 to 31 Dec 2025. Columns such as `Year`, `Quarter`, `MonthName` and `Month Year` describe each day, and every sale links to its day through `DateKey`.
When you slice a report by month or year, use the columns of `'Date'`, not dates stored in `Sales`. Days with no sales still exist in the Date table, so months never go missing, and the time-intelligence functions in the next recipes rely on that complete calendar.
The table is **marked as a date table**, which tells Power BI that `'Date'[Date]` is the official calendar. You can filter it like any other table, for example `CALCULATE([Total Sales], 'Date'[Quarter] = "Q1")`. Year is a number, so a year goes without quotes.
Practice it hands-on with a real data model and a live report that updates as you type.
Q4 Sales = CALCULATE([Total Sales], 'Date'[Quarter] = "Q4")