Previous month with DATEADD
DATEADD(Date[Date], -1, MONTH) shifts the cell’s dates by one month. For a whole month it returns the whole previous month, even when the months have different lengths.
The same function shifts by DAY, QUARTER or YEAR. This matrix is sliced to 2025, and January still finds December 2024, because the date table has it.
Your task
Write Sales PM: the Sales Amount of the previous month.
About this exercise
You practise shifting the date filter with CALCULATE and DATEADD. 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 PM, fills a Power BI-style matrix grouped by Date[Month]. 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 PM =The result to build
Slicer: Year is 2025
| Month | Sales PM |
|---|---|
| Jan | 10,179.30 |
| Feb | 17,710.10 |
| Mar | 8,172.20 |
| Apr | 8,865.15 |
| May | 8,152.25 |
| Jun | 13,348.80 |
| Jul | 3,614.05 |
| Aug | 13,542.45 |
| Sep | 7,859.15 |
| Oct | 8,186.05 |
| Nov | 9,892.25 |
| Dec | 21,375.10 |
| Total | 130,896.85 |
Last updated 10 November 2026
Opening the exercise…