
任意條件函數(shù)匹配
let
表1 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
表2 = Excel.CurrentWorkbook(){[Name="表2"]}[Content],
fun = (a) => Table.SelectRows(Table.AddColumn(表1, "已合并", each Text.Combine({Text.From([姓名], "zh-CN"), Text.From([學(xué)籍號(hào)], "zh-CN"), Text.From([身份證號(hào)], "zh-CN")}, "-"), type text),each Text.Contains([已合并], a))[成績(jī)],
result = Table.AddColumn(表2, "成績(jī)", each try List.Single(fun([查詢(xún)條件])) otherwise error[檢查是否多個(gè)匹配])
in
result