如何在电源查询中执行逐行列表操作
我正在尝试将一个列中的CSV与Power查询同一行中另一行中的另一列中的CSV进行比较。我需要确保一列中的所有CSV都在另一列中。
我尝试使用list.containsall
,但似乎我正在使用的语法不起作用。 在这里共享的解决方案非常接近我所需的内容,但是它比较列中的所有值,而不是单元格的值。 这是我的示例代码,但我认为此图片 更好地解释了父母 - 儿童列。此图显示另一种场景该功能也需要工作。
table.AddColumn(#“替换值”,“合同和技术类型匹配?”,每个list.Containsall({[[技术涡轮型]},{[[Contractual Turbine type]}))
>
I'm trying to compare CSVs from one column with CSVs in another column in the same row in Power Query. I need to ensure that all the CSVs in one column are in the other.
I tried using List.ContainsAll
, but it seems like the syntax I'm using is not working. The solution shared here is very close to what I need, but it's comparing all values in a column, not the cell's values.
Here is my sample code, but I think this picture explains the parent-child columns better. This picture shows another scenario where the function also needs to work.
Table.AddColumn(#"Replaced Value", "Contractual and Technical Types Match?", each List.ContainsAll({[Technical Turbine Type]},{[Contractual Turbine Type]}))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您说您的列包含列表,但您的图像未显示列表。您的图像显示与逗号分开的文本。这就是列表的外观
假设您确实具有逗号分隔的文本列,这确保了合同涡轮类型列中的所有内容也位于技术中涡轮机类型列
添加带有公式的自定义列,
如果您不担心逗号之后的空间,则可以使用此列
You say your column contains a list but your image is not showing a list. Your image is showing text with commas separating them. This is what a list looks like
Assuming you really have columns of comma separated text, this ensures that everything in the Contractual Turbine Type column is also in the Technical Turbine Type column
Add custom column with formula
You could just use this if you are not worried about spaces after the commas