I’m trying to copy a column from one table to another. using the Distinct or Related.
Total Basket = DISTINCT(Sales[Total Basket])
Error: A table of multiple values was supplied where a single value was expected.
Total Basket = RELATED(Sales[Total Basket])
Error: The column ‘Sales[Total Basket]’ either doesn’t exist or doesn’t have a relationship to any table available in the current context.
1
-
The DISTINCT() function returns a table, so it can only be used in a calculated table expression, not in a calculated column nor a measure. This is why you are getting the first error message.
-
The RELATED() function returns a scalar, but it requires a row context, so it can only be used in a calculated column, not a measure
-
The second error message indicates, that you are either using it wrongly in a measure, or in a calculated column, but on the one-side of a one-to-many relationship, which is also not allowed.