The earliest date in the current group.
| Field | Value |
|---|---|
| Category | Date and time |
| Type | Aggregation (operates on a set of rows) |
| Arity | 1 argument (fixed) |
| Compiles to SQL (calculated column) | No |
| Version | Formula 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-05Expected 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.