Level N of the path (1 = root). With "FIM" as the 3rd argument it counts backward (1 = the item itself).
| Field | Value |
|---|---|
| Category | Context and filter |
| Type | Scalar (operates value by value) |
| Arity | 2 to 3 arguments |
| Compiles to SQL (calculated column) | Yes |
| Version | Formula engine v3. |
Aliases#
Canonical name: ITEM_CAMINHO. Accepted aliases (case-insensitive): pathitem.
Syntax#
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#
ITEM_CAMINHO(CAMINHO(conta; conta_pai); 2)Example with values#
Input: path "Ativo|Caixa|Banco", level 2.
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.