FIRSTDATE
The first date in the filter context, as a table of one row.
Group: Time intelligence. Compatible with DAX.
Syntax
FIRSTDATE ( <dates> )
| Parameter | Type | Description |
|---|---|---|
dates | Dates | A column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model. |
Returns
Table. The first 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, as in
ROWor a comparison; when the context holds no date, the value is blank. - On a column of the facts, it is the first date that has rows; on a date table, the first date of the table's filter, whether or not anything happened on it.
- It differs from
MINin what it returns, a table that can filter, and in the context transition it makes in a row context. - 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
First and last month of each scenario
The ledger's own Month column follows the scenario; Periods, the date table, does not.
EVALUATE
SUMMARIZECOLUMNS (
Ledger[Scenario],
"First month", FIRSTDATE ( Ledger[Month] ),
"Last month", LASTDATE ( Ledger[Month] ),
"Last of Periods", LASTDATE ( Periods[Month] )
)
ORDER BY Ledger[Scenario]
| Ledger[Scenario] | First month | Last month | Last of Periods |
|---|---|---|---|
| Actual | 2024-01-01 | 2026-09-01 | 2026-12-01 |
| Budget | 2024-01-01 | 2026-12-01 | 2026-12-01 |
| Forecast | 2026-01-01 | 2026-12-01 | 2026-12-01 |