OpenBI Docs Buy

ENDOFYEAR

The last date of the year in the filter context (the year ending on 31 December, or on a date given).

Group: Time intelligence. Compatible with DAX.

Syntax

ENDOFYEAR ( <dates> [, <year_end_date>] )
ParameterTypeDescription
datesDatesA column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model.
year_end_dateText
optional
The year's last day as month and day, such as "6-30" for a year that ends on 30 June; when left out, 31 December. Not used with a calendar, whose own years count.

Returns

Table. The year's last date that the column holds, as a table of one row.

Remarks

  • The year is the one of the last date in the filter context, ending on 31 December or on the year end given; its last date is the last one the column has in it.
  • On Sales[Month], whose dates are first days, the year ends on 1 December.
  • The table of one row can be used as a value; with no date in the context, it is blank.
  • Given a calendar instead of a column, it works on the calendar's own periods (fiscal years, retail months of four or five weeks, ISO weeks). A filter on a category the calendar does not define, such as a month on a calendar of weeks, can make the call an error.

Examples

The end of the year and of a season

EVALUATE
CALCULATETABLE (
    ROW (
        "End of year", ENDOFYEAR ( Sales[Month] ),
        "End of season", ENDOFYEAR ( Sales[Month], "6-30" )
    ),
    Sales[Month] = DATE ( 2025, 5, 1 )
)
End of yearEnd of season
2025-12-012025-06-01

STARTOFYEAR, ENDOFQUARTER, CLOSINGBALANCEYEAR, DATESYTD.

Last updated · OpenBI Studio 0.3.74