Value of a column in the row where the lookup matches (searches the whole visual). Accepts several lookup columns and a default at the end.
| Field | Value |
|---|---|
| Category | Context and filter |
| Type | Aggregation (operates on a set of rows) |
| Arity | 3 to 9 arguments |
| Compiles to SQL (calculated column) | No |
| Version | Formula engine v3. |
Aliases#
Canonical name: PROCV. Accepted aliases (case-insensitive): lookupvalue, procurar.
Syntax#
PROCV(coluna; arg2; arg3; [arg4]; [arg5]; [arg6]; [arg7]; [arg8]; [arg9])The 1st argument is the name of a column (bare identifier); the others are expressions.
Returns#
The column's value in the matching row, or the default.
Null handling#
If the lookup doesn't match, it returns the given default (or blank).
Evaluation context#
Searches the virtual table of the whole visual (lazy evaluation).
Differences from DAX#
- DAX equivalent: LOOKUPVALUE
- Compatibility: Compatible with DAX
- Note: Searches the whole visual; accepts several lookup columns and a default at the end.
Examples#
PROCV(nome_cliente; id_cliente; VALOR_SELECIONADO(cliente); "—")Example with values#
Input: group SP; visual total = 100.
CALCULAR(SOMA(receita); TUDO()) → 100Expected result: 100
Context illustration — in practice PROCV looks up the value of one column by matching on another (e.g., the customer name from id_cliente).
Business example#
Comparative measure — share of total, ranking, change versus another period.
Common errors#
PROCV: coluna desconhecida: … when a column name does not exist.