Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Use column in one table ('Keywords') to search substrings in a column in another table

Hi All! I've tried implementing this based on some M that I've seen in several places but can't see to get it worked. I know this should be relatively straightforward. Any help appreciated!

I have one table that contains a column of project names. Another table has a column of keywords. I want to search all the substrings in every project name against the keywords. Rows with a hit, create a column called [Match] and a True/False or similar flag. See below. 
 

  • Use following in a custom column

    =List.ContainsAny(Text.Split([Project Name]," "),#"Word List"[Keyword],Comparer.OrdinalIgnoreCase)

     

     

2 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Icon for Most Valuable Professional rankMost Valuable Professional

    Use following in a custom column

    =List.ContainsAny(Text.Split([Project Name]," "),#"Word List"[Keyword],Comparer.OrdinalIgnoreCase)

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      This worked! Thank you very much