The latest 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: ULTIMA_DATA. Accepted aliases (case-insensitive): lastdate.
Syntax#
code
ULTIMA_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: LASTDATE
- Compatibility: DIFFERS from DAX — different semantics, watch out
- Note: Returns the group's latest date as a VALUE (scalar); DAX LASTDATE returns a one-column table.
Examples#
code
ULTIMA_DATA(dia)Example with values#
Input: group with Mar 5 and Mar 20.
code
ULTIMA_DATA(dia) → 2025-03-20Expected result: 2025-03-20
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.