DAX function
TOTALYTD — DAX function reference
Year-to-date total.
Syntax
dax
TOTALYTD(<expression>, <dates>, [<filter>], [<year_end_date>])
Examples
dax
TOTALYTD(SUM(Sales[Amount]), 'Date'[Date])
→ A running total
dax
TOTALYTD(SUM(Sales[Amount]), 'Date'[Date], "6/30")
→ YTD using a fiscal year ending June 30
dax
TOTALYTD(SUM(Sales[Amount]), 'Date'[Date], Sales[Channel] = "Online")
→ Online-only YTD, via the optional filter argument
Common mistakes & gotchas
- Requires a contiguous, marked date table with no gaps; if the Date column isn't marked as a date table (or the calendar has missing days), TOTALYTD can silently return incorrect running totals.
- The year_end_date argument sets a fiscal year end just for that one call — for a company-wide fiscal calendar it’s usually cleaner to build a proper fiscal Date table and use DATESYTD/CALCULATE so every time-intelligence measure stays consistent.
Related DAX functions
From Time intelligence