'How find a string in a text from another table using power bi
Solution 1:[1]
Split TableB Logins by comma into new rows. Then Join the two tables.
let
//Read in Table B
Source = Excel.CurrentWorkbook(){[Name="TableB"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Logins", type text}, {"ID", Int64.Type}}),
//Split logins column by the comma into rows
//Then TRIM to get rid of leading/trailing spaces
#"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Changed Type", {{"Logins", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Logins"),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Logins", type text}}),
#"Trimmed Text" = Table.TransformColumns(#"Changed Type1",{{"Logins", Text.Trim, type text}}),
//Read in Table A and JOIN with B
Source2 = Excel.CurrentWorkbook(){[Name="TableA"]}[Content],
#"Changed Type2" = Table.TransformColumnTypes(Source2,{{"Logins", type text}}),
join=Table.NestedJoin(#"Changed Type2","Logins",#"Trimmed Text","Logins","Joined",JoinKind.LeftOuter),
//expand the joined table with ID only
#"Expanded Joined" = Table.ExpandTableColumn(join, "Joined", {"ID"}, {"ID"})
in
#"Expanded Joined"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ron Rosenfeld |



