Forum Discussion
Distinct Values for column A with filter on column B
I'd simply like to get the distinct values for a particular column that is filtered by another column.
Here is my attempt, but I get the following error:
The VALUES function expects a column reference expression or a table reference expression for argument '1'.
VALUES(
SELECTCOLUMNS(
FILTER(Table,
Table[B] in{"apples","oranges"}
),
"Distinct Column A Values",Table[A]
)
)
Use the following code to create a new table from the modeling tab > New TableNew Table = CALCULATETABLE( VALUES(Table[A]), Table[B] in {"apples","oranges"} )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
1 Reply
- Fowmy
Super User
Use the following code to create a new table from the modeling tab > New TableNew Table = CALCULATETABLE( VALUES(Table[A]), Table[B] in {"apples","oranges"} )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂