Forum Discussion
Lookupvalue help
- 7 years ago
Thanks JSH, I will experiment with that. Might be a cleaner method and I can gain some education in it.
I did find a solution just a minute ago. A combination of IF and ISBLANK works.
= IF(ISBLANK(LOOKUPVALUE(Excel[Clean_Name], Excel[Customer_Name], 'Server'[Customer_Name])), 'Server'[Customer_Name],LOOKUPVALUE(Excel[Clean_Name], Excel[Customer_Name], 'Server'[Customer_Name])), 'Server'[Customer_Name]))
Hey TrentS,
I am also facing a similar problem and I tried the solution you had suggested. I am getting this error "A table of multiple values was supplied where a single value was expected. "
This is what i am trying to do: I am trying to do a lookup with if condition where, if there is a match between ID from table 1 and table 2, i get the corresponding status if not i assign a value, else if there is a match but the status column is empty then i have to assign a new value.
I have two tables: table1 and table 2
table 2 has ID, status
table 1 has ID
column =
I have also attached the pbix file here. It would be great if you have ideas to resolve this!
Hi Anonymous ,
I created a plain pbix to test the syntax/logic and it seemed to work fine with both a value (7) not found in table and a value with a blank status.
I will try to take a peek at your file here shortly.
TrentS
- Anonymous6 years agoNot applicable
Thank you TrentS! I also tried it in another sample file and the following logic works fine.
new status =var lookup =LOOKUPVALUE('table2'[status], 'table2'[ID], 'table1'[ID])var compareVaraiable = BLANK()returnIF(lookup = compareVaraiable, "No ", lookup)I was able to assign values. In that case, am not sure why its not working for my main file. Do you have any guesses? The error is "A table of multiple values was supplied where a single value was expected."
Thanks for your help!
- Ashish_Mathur6 years agoSuper User
Hi,
That error means that there are repetitions in the ID column on Table2.
- Anonymous6 years agoNot applicable
Thank you Ashish_Mathur. It works fine once i removed the duplicates