Forum Discussion
Mcode:Error result If Look Up Value doesnt exist at Source table (should show as blank not "Error")
- Anonymous5 years ago
Hi Anonymous
It takes time to scan so many rows while using Table.SelectRows, please try Table.Group suggested by CNENFRNL edhans
you need to put the code offered by CNENFRNL after your currentLookUp = [UniqueValue] like this and paste in the custom column
=let currentLookUp = [UniqueValue] in Table.Group("LookUp", "UniqueValueCol", {"Grouped", each _}){[UniqueValue=currentLookUp]}?[Grouped]?{0}?[CategoryValue]?
Hello, I 've tried below, however my table loads really slow? Any ideas on how I can optimize my formula?
= (let currentLookUp = try [UniqueValue] in Table.SelectRows("LookUp", each [UniqueValueCol] = currentLookUp)){0}[CategoryValue]) otherwise ""
Anonymous , an alternative to Table.SelectRows is Table.Group, which is, in general, a bit more efficient.
= Table.Group(#"LookUp", "UniqueValueCol", {"Grouped", each _}){[UniqueValue=currentLookUp]}?[Grouped]?{0}?[CategoryValue]?
- Anonymous5 years agoNot applicable
hi CNENFRNL ,
Tried this one and this goes into error, and text color of "Grouped" is red in my formula bar.
Also the result is error, any thoughts?