Forum Discussion
Anonymous
6 years agoNot applicable
ADDCOLUMNS issue
Hello - Trying to use the calculated column formula below and am getting this error message: "This expression refers to mulitiple columns. Multiple columns cannot be converted to a scalar value....
- 6 years ago
Anonymous
Add Potential = VAR MonthNumber = MONTH ( 'Flu_Shipped Orders'[Date Shipped] ) RETURN LOOKUPVALUE ( Forecasts_Snapshots[Potential], Forecasts_Snapshots[Item],'Flu_Shipped Orders'[Item], Forecasts_Snapshots[Est.Close], MonthNumber) - 6 years ago
Anonymous addcolumns return a table not a column, you already have a table to which you are adding column. If you were creating a calculated table using DAX then yes, addcolumns would work.
I would 💖 Kudos 🙂 if my solution helped. If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
parry2k
Super User
6 years agoAnonymous you just need the following expression
LOOKUPVALUE (
Forecasts_Snapshots[Potential],
Forecasts_Snapshots[Item],'Flu_Shipped Orders'[Item],
Forecasts_Snapshots[Est.Close], MonthNumber))
Anonymous
6 years agoNot applicable
parry2k I'm not clear on your solution. This seems to be the same formula I have already.
I tried it as a standalone formula (just using the lookupvalue), but it does not recognize "monthnumber" (that was a VAR from the original formula)