Downloads
DAXTime intelligence: first and lastIntermediate

LASTDATE

Returns the last date in the filter context, as a one-row table.

Syntax
LASTDATE(<dates>)

Returns: A table with one date, used as a filter inside CALCULATE.

What it does

LASTDATE finds the latest date in the current filter context. Inside CALCULATE it pins a measure to that one day. Finance teams use it to read a balance as of the report date or on the last day of the period, such as the closing cash balance for a month. It returns the last date in the context whether or not data exists on that day, so a missing row gives a blank.

Syntax and arguments

Example

A treasury dashboard shows the closing bank balance for the period on the last day of the period. The balance table has one row per account per day.

Cash Closing (last day) =
CALCULATE(
    SUM('Bank_Balances'[Balance]),
    LASTDATE('Calendar'[Date])
)

In a row for October 2026, the measure returns the balance on October 31, 2026. In a row for a single day, it returns that day's balance.

Example: a second, different use

The last transaction date for one customer. MAX reads the fact table, because LASTDATE reads the Calendar and would return the last calendar day in the view.

Last Invoice Date = CALCULATE(MAX('Invoices'[InvoiceDate]))

Things to watch

In business terms

LASTDATE supports closing balances, the as-of balance on a report date, and the closing position used in the month-end pack. Lenders and auditors ask for "the balance as of" a date, which is what LASTDATE returns.

Related functions

All DAX functions · View as Markdown · DAX fundamentals