DAX Filter - VALUES function
Description
Returns a one-column table that contains the distinct values from the specified table or column. In other words, duplicate values are removed and only unique values are returned.
Syntax
VALUES (<TableNameOrColumnName>)
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
TableNameOrColumnName The table or column from which unique values are to be returned. |
Return Value
A column of unique values.
Remarks
You can use DAX VALUES function as an intermediate function, nested in a formula, to get a list of distinct values that can be counted, or used to filter or sum other values.
When you use the DAX VALUES function in a context that has been filtered, such as in a PivotTable, the unique values returned by VALUES are affected by the filter.
Example
= COUNTROWS (VALUES (Sales[Salesperson ID]))
Returns the number of rows that have unique Salesperson IDs.