Skip to content

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

SALDO_FINAL

On this page (10)

The value on the LAST day WITH AN ENTRY in the period (not the sum). Period: "GRUPO" (default), "MES", "TRI", or "ANO".

FieldValue
CategoryDate and time
TypeAggregation (operates on a set of rows)
Arity2 to 3 arguments
Compiles to SQL (calculated column)No
VersionFormula engine v3, with fiscal/4-4-5 calendar support.

Aliases#

Canonical name: SALDO_FINAL. Accepted aliases (case-insensitive): closingbalance.

Syntax#

code
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#

code
SALDO_FINAL(SOMA(saldo); dia; "MES")

Example with values#

Input: balances 1000 (Mar 5) and 1500 (Mar 20), period MES.

code
SALDO_FINAL(SOMA(saldo); dia; "MES")  →  1500

Expected 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".


← Back to the formula index

Related links