Skip to content

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

ESQUERDA

On this page (10)

First N characters.

FieldValue
CategoryText
TypeScalar (operates value by value)
Arity2 arguments (fixed)
Compiles to SQL (calculated column)Yes
VersionFormula engine v3.

Aliases#

Canonical name: ESQUERDA. Accepted aliases (case-insensitive): left.

Syntax#

code
ESQUERDA(expr; arg2)

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: LEFT
  • Compatibility: Compatible with DAX
  • Note: First N characters.

Examples#

code
ESQUERDA(cnpj; 2)

Example with values#

Input: "12345678", first 2.

code
ESQUERDA("12345678"; 2)  →  "12"

Expected result: "12"

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.


← Back to the formula index

Related links