DAX VALUES function

Returns the distinct values of a column (or the rows of a table) visible in the current filters.

VALUES gives the list of values that are "in view": in a table row for France it returns just France. It is how you iterate over groups and read what a slicer selected.

Syntax

VALUES(<table or column>)
ArgumentRequiredDescription
table or columnRequiredThe column whose distinct visible values you want, or a table.

Returns: A one-column table of distinct values (or the table's rows).

Examples

Calculated on the free practice data (table financials), with [Total Sales] = SUM(financials[Sales]) and [Total Profit] = SUM(financials[Profit]).

1. Countries in view, by segment

Countries in View = COUNTROWS(VALUES(financials[Country]))
SegmentCountries in View
Channel Partners5
Enterprise5
Government5
Midmarket5
Small Business5
Total5

Every segment sells in all five countries.

Good to know

  • VALUES can include a blank row when a relationship has unmatched values; DISTINCT doesn't.
  • To get one selected value as a scalar, use SELECTEDVALUE.

Related functions

Official reference: VALUES function on Microsoft Learn