DAX function
ENDOFMONTH — DAX function reference
Last day of the month in context.
Syntax
dax
ENDOFMONTH(<dates>)
Examples
dax
ENDOFMONTH('Date'[Date])→ A date
dax
CALCULATE([Total Inventory], ENDOFMONTH('Date'[Date]))→ Month-end snapshot of an inventory/balance measure
dax
DATEDIFF(TODAY(), ENDOFMONTH('Date'[Date]), DAY)→ Days remaining until month end
Common mistakes & gotchas
- Like FIRSTDATE/LASTDATE, ENDOFMONTH returns a single-row table (the last date of the month), so it’s normally consumed via CALCULATE or coerced to a scalar automatically when a single value is expected.
- It's the standard building block for closing-balance measures (inventory, headcount, account balances) because it ignores whichever specific day is selected within the month and always resolves to month-end.
Related DAX functions
From Time intelligence