Downloads
DAXTime intelligence: to dateIntermediate

DATESYTD

Returns a table of dates from the start of the year up to the last date in the filter context.

Syntax
DATESYTD(<dates> [, <year_end_date>])

Returns: A table of dates, used as a filter inside CALCULATE.

What it does

DATESYTD returns the list of dates from the start of the year to the last date in the current context. CALCULATE uses that list as a filter, so any measure can be shown year to date. It does the same job as TOTALYTD, but it gives you control. You can add other filters inside CALCULATE, or use the dates in other functions.

Syntax and arguments

Example

A company with a June 30 year end wants cash receipts from customers year to date. The receipts are in a Payments table with a PaymentDate column that is related to the Calendar.

Receipts YTD =
CALCULATE(
    SUM('Payments'[Amount]),
    DATESYTD('Calendar'[Date], "6/30")
)

In a November 2026 column, the filter covers July 1, 2026 through November 30, 2026. Receipts before July 1 are excluded, so the figure is the fiscal year to date.

Example: a second, different use

Year to date cash receipts for one customer group, with a second filter inside CALCULATE. The date filter and the customer filter combine.

Wholesale Receipts YTD =
CALCULATE(
    SUM('Payments'[Amount]),
    DATESYTD('Calendar'[Date]),
    'Customers'[Segment] = "Wholesale"
)

Things to watch

In business terms

DATESYTD is the building block for year to date receipts, payments and accruals, and for any balance or flow measure that must reset each fiscal year. Finance teams use it when a measure needs an extra filter that TOTALYTD does not cover easily.

Related functions

All DAX functions · View as Markdown · DAX fundamentals