Downloads
DAXTime intelligence: to dateIntermediate

TOTALYTD

Evaluates an expression from the start of the year up to the last date in the filter context.

Syntax
TOTALYTD(<expression>, <dates> [, <filter>] [, <year_end_date>]). Without a filter, the year end date goes in the third position, as in the examples below.

Returns: A value (a scalar).

What it does

TOTALYTD gives a running total for the year. For a month in the report, it adds up every month from the start of the year to that month. Finance teams use it for revenue and expense year to date, for budget versus actual year to date, and for cumulative cash flow. With a year end argument, it follows a fiscal year that ends on a date other than December 31.

Syntax and arguments

Example

A company has a June 30 year end. In the March 2027 column of a report, the controller wants revenue from the start of the fiscal year, which is July 1, 2026, through March 31, 2027.

Revenue YTD (June year end) =
TOTALYTD([Total Revenue], 'Calendar'[Date], "6/30")

The measure uses the Calendar's dates to find the fiscal year that contains March 2027, then adds up revenue from July 1, 2026 through the last date in the context. Without the year end text, the total would start on January 1, 2027 and miss the July to December months.

Example: a second, different use

Retail channel revenue year to date, for the same June year end. The filter is the second argument after the dates, so the year end goes in the fourth position.

Retail Revenue YTD =
TOTALYTD(
    [Total Revenue],
    'Calendar'[Date],
    'Sales'[Channel] = "Retail",
    "6/30"
)

Things to watch

In business terms

TOTALYTD is the standard year to date measure in board packs, lender reports and budget tracking. Pair it with a prior year version (see SAMEPERIODLASTYEAR) so that the team can compare the same stage of the year. Getting the fiscal year end right is what makes the YTD total match the general ledger.

Related functions

All DAX functions · View as Markdown · DAX fundamentals