'How to match the most approximate values of one column with the string column in another table in Power Query of Power BI?
Solution 1:[1]
See if this works for you in powerquery
Code for Table1, after having created Table2:
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
RelativeMerge = Table.AddColumn(Source, "RelativeJoin",
(x) => Text.Combine(Table.SelectRows(Table2, each Text.Contains(x[Column1],[Column1], Comparer.OrdinalIgnoreCase))[Column1],"::")),
y=List.Transform({1 .. List.Max(List.Transform(RelativeMerge[RelativeJoin], each List.Count(Text.Split(_,"::"))))}, each "match_"& Text.From(_)),
#"Split Column" = Table.SplitColumn(RelativeMerge, "RelativeJoin", Splitter.SplitTextByDelimiter("::", QuoteStyle.Csv), y)
in #"Split Column"
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 |