To calculate a running total that resets at the start of each quarter, you can use CALCULATE and FILTER in DAX while leveraging the DATESQTD function for quarter-based calculations.
DAX Measure for Running Total (Quarterly Reset)
RunningTotal_Quarterly =
CALCULATE(
SUM( 'Sales'[Amount] ),
FILTER(
ALLSELECTED( 'Sales' ),
'Sales'[Date] >= STARTOFQUARTER( 'Sales'[Date] ) &&
'Sales'[Date] <= MAX( 'Sales'[Date] )
)
)
Explanation
- ALLSELECTED('Sales') ensures that the measure respects slicers but still evaluates the full date range within the selected period.
- STARTOFQUARTER('Sales'[Date]) determines the first date of the current quarter.
- FILTER ensures that the sum includes all dates from the quarter start up to the current date in context.
Alternative Approach Using TIME INTELLIGENCE
If you have a separate Date Table, use DATESQTD for better time intelligence support:
RunningTotal_Quarterly =
TOTALQTD( SUM('Sales'[Amount]), 'Date'[Date] )