Forum Discussion
Anonymous
3 years agoNot applicable
Check whether a string contains a value from another table
I have as a list (about 900) of values that I am interested in: Genus Table: Genus of interest Metopina Neuroptera Corynoptera … In a separate table, I have free text (lab result...
- 3 years ago
Hi,
This M code works
let Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content], #"Added Custom" = Table.AddColumn(Source, "Custom", each List.Contains(Genus[Genus of interest],[freetext],(x as text, y as text)=>Text.Contains(y,x,Comparer.OrdinalIgnoreCase))) in #"Added Custom"Hope this helps.
Ashish_Mathur
3 years agoSuper User
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each List.Contains(Genus[Genus of interest],[freetext],(x as text, y as text)=>Text.Contains(y,x,Comparer.OrdinalIgnoreCase)))
in
#"Added Custom"
Hope this helps.