OpenBI Docs Buy

ENDOFMONTH

Gives the column's final date in the month of the filter context: on business days, the month's last business day.

Group: Time intelligence. Compatible with DAX.

Syntax

ENDOFMONTH ( <dates> )
ParameterTypeDescription
datesDatesA column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model.

Returns

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

Remarks

  • The month is the one of the last date in the filter context. Its last date is the last one the column has in that month, not the calendar's: on business days, February 2026 ends on Friday the 27th, and on Sales[Month], whose dates are first days, each month ends on its first.
  • For the calendar's last day of a month, use EOMONTH.
  • 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 last business day of February

EVALUATE
CALCULATETABLE (
    ROW ( "Start of month", STARTOFMONTH ( Prices[Date] ), "End of month", ENDOFMONTH ( Prices[Date] ) ),
    Prices[Month] = DATE ( 2026, 2, 1 )
)
Start of monthEnd of month
2026-02-022026-02-27

On a column of first days

EVALUATE
CALCULATETABLE (
    ROW ( "End of month", ENDOFMONTH ( Sales[Month] ), "Calendar month end", EOMONTH ( MAX ( Sales[Month] ), 0 ) ),
    Sales[Month] = DATE ( 2025, 5, 1 )
)
End of monthCalendar month end
2025-05-012025-05-31

STARTOFMONTH, ENDOFQUARTER, EOMONTH, CLOSINGBALANCEMONTH, LASTDATE.

Last updated · OpenBI Studio 0.3.74