问题描述
你能帮我在 Power Query 中执行以下分析吗?
有 2 个表 - "Contracts" 和 "Payments" (https://disk.yandex.ru/i/HYLpirPhurkylg)
“合同”表由 [Buyer ID],[Seller ID],[Contract Number],[Contract Date],[Amount].
等字段组成
付款表包含 [Payer ID],[Payee ID],[Date of payment],[Amount of payment],[Descr]
等字段。
每对 [Buyer ID] - [Seller ID]
可以有多个合约。
每份合同可以有多次付款。
在这种情况下,[Buyer ID] = [Payer ID],[Seller ID] = [Payee ID]
和 [Descr]
作为文本包括 [Contract Number]
和 [Contract Date]
。
任务是找到付款并将其与合同匹配。
如我所见。
通过合并[Buyer ID] + [Seller ID]
和[Payer ID] + [Payee ID]
字段可以得到表连接的key。然后为每个密钥(对 [Buyer ID] + [Seller ID]
)编译一个合约编号列表。
对我来说最困难的任务是在 Payments 表的 [Descr]
字段中进行搜索,我们将在文本中为每对搜索合同编号,并将它们复制到一个新字段中。 [Contract_Number_1]
。
最后,我将使用 3 个字段 [Buyer ID] + [Seller ID] + [Contract Number]
创建一个新键,并在 Payments 表中 - [Payer ID] + [Payee ID] + [Contract_Number_1]
并使用此键执行合并。
问题是 - 如何使用 Excel Power Query 执行此类搜索?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)