Skip to content

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

PROCV

On this page (10)

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.

FieldValue
CategoryContext and filter
TypeAggregation (operates on a set of rows)
Arity3 to 9 arguments
Compiles to SQL (calculated column)No
VersionFormula engine v3.

Aliases#

Canonical name: PROCV. Accepted aliases (case-insensitive): lookupvalue, procurar.

Syntax#

code
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#

code
PROCV(nome_cliente; id_cliente; VALOR_SELECIONADO(cliente); "—")

Example with values#

Input: group SP; visual total = 100.

code
CALCULAR(SOMA(receita); TUDO())  →  100

Expected 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.


← Back to the formula index

Related links