1 when the column has a single value in the current group.
| Field | Value |
|---|---|
| Category | Context and filter |
| Type | Aggregation (operates on a set of rows) |
| Arity | 1 argument (fixed) |
| Compiles to SQL (calculated column) | No |
| Version | Formula engine v3. |
Aliases#
Canonical name: TEM_UM_VALOR. Accepted aliases (case-insensitive): hasonevalue.
Syntax#
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#
SE(TEM_UM_VALOR(uf); SOMA(receita); "—")Example with values#
Input: group with a single uf (SP).
TEM_UM_VALOR(uf) → 1Expected 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.