Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

PRIMEIRA_DATA

On this page (10)

The earliest date in the current group.

FieldValue
CategoryDate and time
TypeAggregation (operates on a set of rows)
Arity1 argument (fixed)
Compiles to SQL (calculated column)No
VersionFormula engine v3.

Aliases#

Canonical name: PRIMEIRA_DATA. Accepted aliases (case-insensitive): firstdate.

Syntax#

code
PRIMEIRA_DATA(coluna)

The 1st argument is the name of a column (bare identifier); the others are expressions.

Returns#

Date.

Null handling#

A group with no date returns blank.

Evaluation context#

Over the current group's rows.

Differences from DAX#

  • DAX equivalent: FIRSTDATE
  • Compatibility: DIFFERS from DAX — different semantics, watch out
  • Note: Returns the group's earliest date as a VALUE (scalar); DAX FIRSTDATE returns a one-column table.

Examples#

code
PRIMEIRA_DATA(dia)

Example with values#

Input: group with Mar 5 and Mar 20.

code
PRIMEIRA_DATA(dia)  →  2025-03-05

Expected result: 2025-03-05

Business example#

Time analysis — order age, accrual month/year, accounting close.

Common errors#

Typos in a column name, an incompatible type, or an invalid argument become a friendly message (pt-BR) — the engine never silently returns a wrong number.


← Back to the formula index

Related links