Sample Data
This table lists products sold, with some repeated names.
| Cell | Value |
|---|---|
| A1 | Product |
| A2 | Apple |
| A3 | Banana |
| A4 | Apple |
| A5 | Orange |
| A6 | Banana |
| A7 | Grape |
This table lists products sold, with some repeated names.
| Cell | Value |
|---|---|
| A1 | Product |
| A2 | Apple |
| A3 | Banana |
| A4 | Apple |
| A5 | Orange |
| A6 | Banana |
| A7 | Grape |
VALUES('Table'[Product])A 1 Product 2 Apple 3 Banana 4 Apple 5 Orange 6 Banana 7 Grape
B 1 Unique Products 2 Apple 3 Banana 4 Orange 5 Grape
VALUES and DISTINCT?VALUES behaviorVALUES returns unique values from a column and includes blank values if they exist.DISTINCT behaviorDISTINCT returns unique values but excludes blank values from the result.VALUES includes blanks, DISTINCT excludes blanks -> Option AProduct[Category] using DISTINCT?Product[Category].VALUES and DISTINCT take a column reference in parentheses. The correct syntax is DISTINCT(Product[Category]).Sales with a column CustomerID containing values [1, 2, 2, 3, BLANK, 3], what will be the result of COUNTROWS(VALUES(Sales[CustomerID]))?CustomerID are 1, 2, 3, and BLANK. That is 4 unique values.COUNTROWS on VALUESVALUES returns unique values including blanks, so COUNTROWS counts 4 rows.UniqueProducts = DISTINCT(Product[ProductName]). When you use it in a card visual, it shows an error. What is the problem?DISTINCT returns a table of unique values, not a single number or scalar value.Customers[Name] column. Which DAX expression should you use to create a calculated table for this slicer?VALUES and DISTINCT return unique values, but VALUES includes blanks while DISTINCT excludes them.DISTINCT returns unique values excluding blanks, which is perfect for a slicer.CustomerNames = DISTINCT(Customers[Name]) directly provides unique non-blank names without needing extra filtering.Pass the test and this pattern moves unknown