Skip to content

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

TRUNCAR

On this page (10)

Cuts off the decimal places (doesn't round).

FieldValue
CategoryMath
TypeScalar (operates value by value)
Arity1 to 2 arguments
Compiles to SQL (calculated column)Yes
VersionFormula engine v3.

Aliases#

Canonical name: TRUNCAR. Accepted aliases (case-insensitive): trunc.

Syntax#

code
TRUNCAR(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: TRUNC
  • Compatibility: Compatible with DAX
  • Note: Cuts off decimal places without rounding.

Examples#

code
TRUNCAR(9,99; 1)

Example with values#

Input: 9,99 with 1 place.

code
TRUNCAR(9,99; 1)  →  9,9

Expected result: 9,9

Business example#

Normalize financial numbers — round prices, remove the sign from a deviation, compute powers/roots.

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