Forum Discussion

KAURM's avatar
KAURM
Helper I
4 years ago
Solved

Compare one list (column) to another in Power Query Editor to return a true/false if it appears

Morning, I hope you are all well.   I'm struggling with two columns in two queries, the first is in the query #"Key phrases from responses":     and the second is in #"Categories" query: ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi KAURM 

     

    It looks like they are all lower case already, you can go directly to the query #"Key phrases from responses" to add a custom column

     Table.AddColumn(yourPreStep, "yourNewColumnName", each List.Contains(Categories[key phrases],[key phrases]))
  • KAURM's avatar
    4 years ago

    Hi Anonymous 

     

    Thank you for your help! I did this before and it didn't work.

     

    Just realised that when using Power BI Text Analytics the key phrases/words have spaces in front of them.

     

    Just trimmed the column and now it works 🙂

     

    Thanks for your help!