Streak 0 daysPoints 0

Lesson39/59
FILTER over ALL dates

Running total over all dates

New functionsCALCULATE, FILTER, ALL, MAX
StatusNot started

A running total adds everything up to the end of the cell, across year boundaries. The filter is every date up to the cell’s last date: FILTER(ALL(Date[Date]), Date[Date] <= MAX(Date[Date])).

MAX(Date[Date]) is evaluated in the cell, before FILTER iterates. Inside FILTER, ALL(Date[Date]) provides every date, so the condition can reach back past the cell.

Your task

Write Sales Running Total: the Sales Amount of every date up to and including the last date of the cell.

*1*1*1*1SALEST1 · 420 ROWSSalesKeyNUMOrder DateDATEShip DateDATEProductKeyNUMCustomerKeyNUMQuantityNUMUnit PriceNUMPRODUCTT2 · 8 ROWSProductKeyNUMProductTEXTCategoryTEXTColorTEXTList PriceNUMStandard CostNUMCUSTOMERT3 · 10 ROWSCustomerKeyNUMCustomerTEXTCountryTEXTSegmentTEXTDATET4 · 731 ROWSDateDATEYearNUMQuarterTEXTMonthTEXTMonth NumberNUMNOTES1Filters flow from 1 to *, alongthe arrow: Product filters Sales.2Select a column or a measureto insert it at the cursor.3Measures in this model:[Sales Amount]Key columnFact tableSALES MODEL · STAR SCHEMASHEET 1 OF 1

About this exercise

You practise filter over all dates with CALCULATE, FILTER, ALL and MAX. 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 Running Total, 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 Running Total =

The result to build

Expected result for Sales Running Total
Year › QuarterSales Running Total
2024127,658.15
Q124,861.05
Q263,485.35
Q398,398.15
Q4127,658.15
2025257,394.45
Q1162,405.60
Q2187,520.70
Q3217,108.35
Q4257,394.45
Total257,394.45

Last updated 10 November 2026

Opening the exercise…