Goal: Calculate running totals that reset automatically.
Watch how YTD resets in January, and QTD resets in April.
Ready...
π» DAX Formula
-- Scenario 1: Year-to-Date Running Total
MEASURE Sales YTD =
TOTALYTD( SUM(Sales[Amt]), 'Date'[Date] )
-- Accumulates until Dec 31, then resets.
-- Scenario 2: Quarter-to-Date Running Total
MEASURE Sales QTD =
TOTALQTD( SUM(Sales[Amt]), 'Date'[Date] )
-- Resets at start of Q1, Q2, Q3, Q4.