Forum Discussion

jansse's avatar
jansse
Regular Visitor
1 year ago
Solved

Comparing col start/ prefix to another tbl and returning corresponding row

Hi, I am fairly new to Power Query but capable of managing my self with basics. Now I received challenge with what I dont have any faintest Idea how to approach it. Could you please help me abit?   ...
  • jansse's avatar
    jansse
    1 year ago

    With this I wasnt all the to finish but almoust. This gave me value from the prefix col and not from the description col. I found on another topic thing that i was able to compose as a solution by using your suggested solution

    = Table.AddColumn(PREVIOUSSTEP, "prefixFound", each List.First(Table.SelectRows(tblImaginary (insideTbl) => Text.StartsWith([valueToCompare], insideTbl[prefix]))[Description]), type text)

    So... in other words I wouldn't have been able to get this with out you!! Thanks you!!!!