Forum Discussion
Adding column based on value from other table
- 4 years ago
What I suggested should work for calculated columns but with a measure, it doesn't automatically know which id value you want to look up (since there isn't the same row context that exists for a calculated column).
Try adding an aggregation as the error message indicates:
LOOKUPVALUE ( item[supplier_name], item[supplier_id], SELECTEDVALUE ( invoice[supplier_id] ) )
The LOOKUPVALUE function works pretty similarly to VLOOKUP.
Try something along these lines:
LOOKUPVALUE (
item[supplier_name],
item[supplier_id], invoice[supplier_id]
)- Anonymous4 years agoNot applicable
When I atempt to use that function, I am getting this error. Do you know what could be causing this?
- AlexisOlson4 years ago
Super User
What I suggested should work for calculated columns but with a measure, it doesn't automatically know which id value you want to look up (since there isn't the same row context that exists for a calculated column).
Try adding an aggregation as the error message indicates:
LOOKUPVALUE ( item[supplier_name], item[supplier_id], SELECTEDVALUE ( invoice[supplier_id] ) )- Anonymous4 years agoNot applicable
Can I use this formula but add a true and false / IF THEN statement. Basically sating if this column equals "0" then pull the data from another column. If it is possible, how would it look?