Error-free division: returns the fallback when the divisor is zero.
| Field | Value |
|---|---|
| Category | Context and filter |
| Type | Scalar (operates value by value) |
| Arity | 2 to 3 arguments |
| Compiles to SQL (calculated column) | Yes |
| Version | Formula engine v3. |
Aliases#
Canonical name: DIVIDIR. Accepted aliases (case-insensitive): divide.
Syntax#
code
DIVIDIR(expr; arg2; [arg3])All arguments are expressions.
Returns#
Number (or the fallback when the divisor is zero).
Null handling#
A zero (or blank) divisor returns the given fallback.
Evaluation context#
Scalar — evaluated on the result of the arguments (in calculated columns, it runs row by row).
Differences from DAX#
- DAX equivalent: DIVIDE
- Compatibility: Compatible with DAX
- Note: Safe division: returns the fallback when the divisor is zero.
Examples#
code
DIVIDIR(SOMA(lucro); SOMA(receita); 0)Example with values#
Input: 150 divided by 0, fallback 0.
code
DIVIDIR(150; 0; 0) → 0Expected result: 0
Business example#
Margin = profit ÷ revenue, without breaking when revenue is zero.
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.