Removes extra spaces.
| Field | Value |
|---|---|
| Category | Text |
| Type | Scalar (operates value by value) |
| Arity | 1 argument (fixed) |
| Compiles to SQL (calculated column) | Yes |
| Version | Formula engine v3. |
Aliases#
Canonical name: ARRUMAR. Accepted aliases (case-insensitive): trim.
Syntax#
code
ARRUMAR(expr)All arguments are expressions.
Returns#
Text.
Null handling#
Blank becomes empty text ("").
Evaluation context#
Scalar — evaluated on the result of the arguments (in calculated columns, it runs row by row).
Differences from DAX#
- DAX equivalent: TRIM
- Compatibility: Compatible with DAX
- Note: Removes spaces at both ends and collapses repeated inner spaces into one (like TRIM).
Examples#
code
ARRUMAR(nome)Example with values#
Input: " olá mundo " (extra spaces).
code
ARRUMAR(" olá mundo ") → "olá mundo"Expected result: "olá mundo"
Business example#
Standardize records and labels — CNPJ, SKU, channel name, report legends.
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.