Skip to content

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

TEM_UM_VALOR

On this page (10)

1 when the column has a single value in the current group.

FieldValue
CategoryContext and filter
TypeAggregation (operates on a set of rows)
Arity1 argument (fixed)
Compiles to SQL (calculated column)No
VersionFormula engine v3.

Aliases#

Canonical name: TEM_UM_VALOR. Accepted aliases (case-insensitive): hasonevalue.

Syntax#

code
TEM_UM_VALOR(coluna)

The 1st argument is the name of a column (bare identifier); the others are expressions.

Returns#

Logical (1 = a single value in the group, 0 = more than one).

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#

Aggregation — goes through the rows of the visual's current group.

Differences from DAX#

  • DAX equivalent: HASONEVALUE
  • Compatibility: Compatible with DAX
  • Note: Returns 1/0 instead of TRUE/FALSE.

Examples#

code
SE(TEM_UM_VALOR(uf); SOMA(receita); "—")

Example with values#

Input: group with a single uf (SP).

code
TEM_UM_VALOR(uf)  →  1

Expected result: 1

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