Forum Discussion
TrentS
Helper IV
7 years agoLookupvalue help
I am returning to a previous issue (https://community.powerbi.com/t5/Desktop/Logic-help-IF-Switch-Contains/m-p/622072#M296983) with an update. (Thanks Greg for that previous help.) It works with the...
- 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]))
Anonymous
7 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()
return
IF(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_Mathur
Super User
7 years agoHi,
That error means that there are repetitions in the ID column on Table2.
- Anonymous7 years agoNot applicable
Thank you Ashish_Mathur. It works fine once i removed the duplicates
- Ashish_Mathur7 years ago
Super User
You are welcome.