Forum Discussion
aoliver
Helper III
6 years agoSelect Rows if text Contains (Value of a list)
Hello everyone, ill explain my problem with examples: I have a table like this: ID - Message 1 - @asdf 2 - @8rr 3 - 674 4 - 1231@3 etc In a List, i have the differents values which I wa...
- 6 years ago
aoliver here is how you can do it
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTQVXBILE5JU4rViVYyAvEsiorAHGMgx8zcBMw2AbINjYwNHYyVYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", (x) => List.MatchesAny(SearchList, each Text.Contains(x[Column1], _))) in #"Added Custom"here is the query for SearchList
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcrBQitUBUsZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}), Column1 = #"Changed Type"[Column1] in Column1Would appreciate Kudos 🙂 if my solution helped.
parry2k
Super User
6 years agoaoliver here is how you can do it
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTQVXBILE5JU4rViVYyAvEsiorAHGMgx8zcBMw2AbINjYwNHYyVYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", (x) => List.MatchesAny(SearchList, each Text.Contains(x[Column1], _)))
in
#"Added Custom"
here is the query for SearchList
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcrBQitUBUsZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
Column1 = #"Changed Type"[Column1]
in
Column1
Would appreciate Kudos 🙂 if my solution helped.
aoliver
Helper III
6 years agoAmazing, this is exactly what I looking for, THANKS!