Forum Discussion
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
I am trying to use ADDCOLUMNS on an existing measure that is to be filtered by date and location from two different tables. But I am not sure if this the right way to do it as I am stuck with the error code in the title. Here is my code. Seeking some help to fix this. Thank you!
VAR Sales =
ADDCOLUMNS (
ALLSELECTED ( 'Item'[No_] ),
"NetRev",
CALCULATE (
[Expected Net Revenue],
ALL ( 'Date' ),
'Date'[FY YEAR] = FiscalYear
&& ALL ( 'sku_forecast' ), 'sku_forecast'[location] = LocName
)
)
Hi balaganeshmohan ,
Your DAX will return a table with multi columns, it couldn't be a measure.
And if you want to use a measure ,could you share your sample data and expect output?
Best Regards
Lucien
2 Replies
- v-luwang-msftCommunity Support
Hi balaganeshmohan ,
Your DAX will return a table with multi columns, it couldn't be a measure.
And if you want to use a measure ,could you share your sample data and expect output?
Best Regards
Lucien
- v-luwang-msftCommunity Support
Hi balaganeshmohan ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.
Best Regards
Lucien