Table Functions Examples =
// we can put virual tables in where it says filter
// CALCULATE([Total Sales], here
ADDCOLUMNS(
VALUES(Products[Product Name]),
“Profit Margins”, [Profit Margin] )
Error:
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
I’m assuming that I am missing something within modeling.
You’ve commented-out the CALCULATE line in the DAX query and are only returning the FILTER portion of the CALCULATE statements. Measures can only return a single scalar value, not a table, hence the error. Here’s your code with the first line uncommented:
Table Functions Examples =
// we can put virtual tables in where it says filter
CALCULATE( [Total Sales],
ADDCOLUMNS(
VALUES( Products[Product Name] ),
"Profit Margins", [Profit Margins] )
)
I wanted to see the virtual table as a look up table for reference sake. I think I selected the wrong calculation like new column or new measure instead of new table. It works now, thank you!