Forum Discussion
ADDCOLUMNS issue
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)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!
7 Replies
- parry2kSuper User
Anonymous you just need the following expression
LOOKUPVALUE ( Forecasts_Snapshots[Potential], Forecasts_Snapshots[Item],'Flu_Shipped Orders'[Item], Forecasts_Snapshots[Est.Close], MonthNumber))- AnonymousNot 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)
- AnonymousNot applicable
Just a quick update....changing the "monthnumber" to the actual value, also gives me the same error. "A table of multiple values was supplied where a single value was expected"
I don't get it because the code seems correct.
Lookup = LOOKUPVALUE (Forecasts_Snapshots[Potential],Forecasts_Snapshots[Item],'Flu_Shipped Orders'[Item],Forecasts_Snapshots[Est.Close],'Flu_Shipped Orders'[Date Shipped])- parry2kSuper User
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)
- AnonymousNot applicable
Also when working with calculated columns I find it rather useful to 'design' the formula in excel first. That way you get better error handling compared to Power BI Pro.