Forum Discussion

Wahid777's avatar
Wahid777
Frequent Visitor
5 years ago
Solved

Creating a conditional column with boolean (Yes/No) result for matching partial text matches

Hi   I've got a column listed as below and I'm trying to create a new column (with a Yes/No or True/False response) if some matches of certain keywords are found in the original column. Would "CONT...
  • v-alq-msft's avatar
    5 years ago

    Hi, Wahid777 

     

    Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

    Table1:

     

    Table2:

     

    You may create a custom column with the following codes.

    if List.ContainsAny(Text.Split([Original column]," "),Table2[Keywords],Comparer.OrdinalIgnoreCase)
    then "Yes" else "No"

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.