Skip to content

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

DIVIDIR

On this page (10)

Error-free division: returns the fallback when the divisor is zero.

FieldValue
CategoryContext and filter
TypeScalar (operates value by value)
Arity2 to 3 arguments
Compiles to SQL (calculated column)Yes
VersionFormula 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)  →  0

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


← Back to the formula index

Related links