OpenBI Docs Buy

LASTDATE

The last date in the filter context, as a table of one row.

Group: Time intelligence. Compatible with DAX.

Syntax

LASTDATE ( <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 last date in the filter context, as a table of one row; empty when there is none.

Remarks

  • The table of one row can be used as a value; when the context holds no date, the value is blank.
  • On a date table it is the last date of the table's filter, not the last date with data: Periods runs to December 2026 even where the actuals stop in September. For the last date with data use LASTNONBLANK.
  • Used as a filter in CALCULATE, it gives a value on the last date only.
  • 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 month of the data

EVALUATE
ROW ( "First month", FIRSTDATE ( Sales[Month] ), "Last month", LASTDATE ( Sales[Month] ) )
First monthLast month
2023-11-012026-10-01

Last month of each scenario

EVALUATE
SUMMARIZECOLUMNS (
    Ledger[Scenario],
    "Last month", LASTDATE ( Ledger[Month] ),
    "Last of Periods", LASTDATE ( Periods[Month] ),
    "Last with an amount", LASTNONBLANK ( Periods[Month], [Booked amount] )
)
ORDER BY Ledger[Scenario]
Ledger[Scenario]Last monthLast of PeriodsLast with an amount
Actual2026-09-012026-12-012026-09-01
Budget2026-12-012026-12-012026-12-01
Forecast2026-12-012026-12-012026-12-01

FIRSTDATE, ENDOFMONTH, LASTNONBLANK, MAX.

Last updated · OpenBI Studio 0.3.74