1st non-blank value in the list.
| Field | Value |
|---|---|
| Category | Logic |
| Type | Scalar (operates value by value) |
| Arity | 2 or more arguments |
| Compiles to SQL (calculated column) | Yes |
| Version | Formula engine v3. |
Aliases#
Canonical name: COALESCE. Accepted aliases (case-insensitive): primeiro.
Syntax#
code
COALESCE(expr; arg2; …)All arguments are expressions.
Returns#
The 1st non-blank value in the list (keeps the type).
Null handling#
Skips blanks and returns the 1st non-blank value; all blank returns blank.
Evaluation context#
Scalar — evaluated on the result of the arguments (in calculated columns, it runs row by row).
Differences from DAX#
- DAX equivalent: COALESCE
- Compatibility: Compatible with DAX
- Note: First non-blank value in the list.
Examples#
code
COALESCE(desconto; 0)Example with values#
Input: 1 / 0 (blank) and fallback 99.
code
COALESCE(1 / 0; 99) → 99Expected result: 99
Business example#
Fill a missing discount with 0 instead of leaving it blank.
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.