The value on the LAST day WITH AN ENTRY in the period (not the sum). Period: "GRUPO" (default), "MES", "TRI", or "ANO".
| Field | Value |
|---|---|
| Category | Date and time |
| Type | Aggregation (operates on a set of rows) |
| Arity | 2 to 3 arguments |
| Compiles to SQL (calculated column) | No |
| Version | Formula engine v3, with fiscal/4-4-5 calendar support. |
Aliases#
Canonical name: SALDO_FINAL. Accepted aliases (case-insensitive): closingbalance.
Syntax#
SALDO_FINAL(expr; arg2; [arg3])All arguments are expressions.
Returns#
Number (the snapshot of the last day with an entry), or blank.
Null handling#
Uses the last day WITH an entry — skips days with no activity at the close.
Evaluation context#
Time intelligence — finds the group's reference date and re-evaluates the measure over the VISUAL's rows (uses allRows) that fall within the window. Switches to fiscal/4-4-5 when the model has that calendar.
Differences from DAX#
- DAX equivalent: CLOSINGBALANCEMONTH/QUARTER/YEAR
- Compatibility: DIFFERS from DAX — different semantics, watch out
- Note: The snapshot of the LAST day WITH AN ENTRY (not the last calendar day). Configurable period: GRUPO (default), MES, TRI, or ANO.
Examples#
SALDO_FINAL(SOMA(saldo); dia; "MES")Example with values#
Input: balances 1000 (Mar 5) and 1500 (Mar 20), period MES.
SALDO_FINAL(SOMA(saldo); dia; "MES") → 1500Expected result: 1500
Business example#
Account closing balance at month end (last day with an entry).
Common errors#
SALDO_FINAL: período deve ser "GRUPO", "MES", "TRI" ou "ANO".