Skip to content

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

ITEM_CAMINHO

On this page (10)

Level N of the path (1 = root). With "FIM" as the 3rd argument it counts backward (1 = the item itself).

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: ITEM_CAMINHO. Accepted aliases (case-insensitive): pathitem.

Syntax#

code
ITEM_CAMINHO(expr; arg2; [arg3])

All arguments are expressions.

Returns#

Text (the requested level of the path), or blank.

Null handling#

When there is no row in the changed context, it returns blank (never zero) — a blank is more honest than a made-up zero.

Evaluation context#

Scalar — evaluated on the result of the arguments (in calculated columns, it runs row by row).

Differences from DAX#

  • DAX equivalent: PATHITEM
  • Compatibility: Compatible with DAX
  • Note: Level N of the path. With "FIM" as the 3rd argument it counts backward (in DAX that's the separate PATHITEMREVERSE function).

Examples#

code
ITEM_CAMINHO(CAMINHO(conta; conta_pai); 2)

Example with values#

Input: path "Ativo|Caixa|Banco", level 2.

code
ITEM_CAMINHO("Ativo|Caixa|Banco"; 2)  →  "Caixa"

Expected result: "Caixa"

Business example#

Comparative measure — share of total, ranking, change versus another period.

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