The value on the FIRST 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_INICIAL. Accepted aliases (case-insensitive): openingbalance.
Syntax#
SALDO_INICIAL(expr; arg2; [arg3])All arguments are expressions.
Returns#
Number (the snapshot of the first day with an entry), or blank.
Null handling#
Uses the first day WITH an entry in the period.
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: OPENINGBALANCEMONTH/QUARTER/YEAR
- Compatibility: DIFFERS from DAX — different semantics, watch out
- Note: The snapshot of the FIRST day WITH AN ENTRY in the period; same period argument as SALDO_FINAL.
Examples#
SALDO_INICIAL(SOMA(saldo); dia; "MES")Example with values#
Input: balances 1000 (Mar 5) and 1500 (Mar 20), period MES.
SALDO_INICIAL(SOMA(saldo); dia; "MES") → 1000Expected result: 1000
Business example#
Time analysis — order age, accrual month/year, accounting close.
Common errors#
SALDO_INICIAL: período deve ser "GRUPO", "MES", "TRI" ou "ANO".