Remainder of the division.
| Field | Value |
|---|---|
| Category | Math |
| Type | Scalar (operates value by value) |
| Arity | 2 arguments (fixed) |
| Compiles to SQL (calculated column) | Yes |
| Version | Formula engine v3. |
Aliases#
Canonical name: MOD. Accepted aliases (case-insensitive): (nenhum).
Syntax#
code
MOD(expr; arg2)All arguments are expressions.
Returns#
Number.
Null handling#
Text that is not a number, or a blank value in a calculation, becomes a friendly error (pt-BR) — never a silent zero.
Evaluation context#
Scalar — evaluated on the result of the arguments (in calculated columns, it runs row by row).
Differences from DAX#
- DAX equivalent: MOD
- Compatibility: Compatible with DAX
- Note: Remainder of the division; a zero divisor becomes an error.
Examples#
code
MOD(pedidos; 2)Example with values#
Input: 7 divided by 2.
code
MOD(7; 2) → 1Expected result: 1
Business example#
Normalize financial numbers — round prices, remove the sign from a deviation, compute powers/roots.
Common errors#
MOD: divisor zero.