DATESYTD DAX Function in Power BI
The DATESYTD DAX function returns a single-column table that contains dates for the year-to-date (YTD) in the current filter context. For example, if the current date in the filter context is 7 July 2008, then it returns all the dates from 1 Jan 2008 to 7 July 2008, as by default the year_end_date is 31st December. So by default year starts from 1 January.
DAX Syntax DATESYTD(dates [,year_end_date])
The function takes the following parameters:
• dates: A column that contains dates. • year_end_date (optional) : A literal string with a date that defines the year-end date. The default is December 31.
Example: Let’s create the measure with name DATESYTD Measure.
DAX
The output of the above dax function is shown below:

In our calculations mostly this is called as the running total.
Note: The value 3582 is the latest total Year to date value.