DAX FIRSTDATE Funciton

Get the earliest date visible in the current filter context.

FIRSTDATE returns the first (earliest) date from the dates in the current filter context.

Syntax

FIRSTDATE(<dates>)
  • <dates> : A column of dates (usually from a Date table).

How It Works

  • It returns a single date value representing the earliest date visible in the current filter context.
  • If there are multiple dates, it picks the earliest.
  • If no dates exist in the current context, it returns BLANK().

Example

Get the first date of sales in the filtered context:

First Sale Date := FIRSTDATE('Date'[Date])

If you filter your report for the year 2023, this will return the earliest date in 2023 with sales data.

Common Use Case

You might use FIRSTDATE in combination with other functions to calculate things like cumulative sales from the first date.

No questions available.