客户表里字段中间有特殊字符,需要先转换。
建议将匹配出多个的结果再手动排查一下,试试:
- let
- 源 = Excel.CurrentWorkbook(){[Name="表2"]}[Content],
- 提取 = Table.AddColumn(源, "a", each Text.SplitAny([Customer MPN],Text.Remove([Customer MPN],{"a".."z","A".."Z","0".."9","%","/","-"})){0}),
- 初步匹配 = Table.AddColumn(提取, "b", each Table.SelectRows(表1, (x)=>Text.Contains(x[Company MPN],[a]) )),
- 展开 = Table.ExpandTableColumn(初步匹配, "b", {"Company MPN"}, {"Company MPN"}),
- 分组的行 = Table.Group(展开, {"Company MPN"}, {{"匹配个数", each Table.RowCount(_)},{"匹配Customer MPN", each Text.Combine([Customer MPN]," , ")}})
- in
- 分组的行
复制代码
|