DAX function
VALUES — DAX function reference
Distinct values as a table.
Syntax
dax
VALUES(<table> | <column>)
Examples
dax
VALUES(Sales[Region])
→ A one-column table
dax
COUNTROWS(VALUES(Sales[Region]))
→ Number of distinct regions in context
dax
IF(COUNTROWS(VALUES(Product[Category])) = 1, SELECTEDVALUE(Product[Category]), "Multiple categories")
→ A safe multi-category label
Common mistakes & gotchas
- VALUES(column) returns an extra blank row when the current filter context includes fact-table rows with no matching related-table value (e.g., an orphaned foreign key) — DISTINCT(column) never adds that row.
- VALUES(Table) (a whole table, not a column) returns the distinct rows of that table under the current filter context — the standard way to iterate one row per visible entity with ADDCOLUMNS or SUMX.
Related DAX functions
From Filter context