电源查询;过滤以仅显示一个值组合
我正在尝试使用Excel Power查询将列的一个组合过滤为:
示例:
原始表:
Header1 | Header2 |
---|---|
a | b b |
b | b |
b b | c |
期望的结果:
header1 | header2 header2 |
---|---|
a | b |
b | c |
可以是ab/ba的任何组合只要只有一个。
我包括了一个未完成查询的演示工作簿的链接。尝试多种方法使它起作用。
任何人都可以借用他们的专业知识来帮助实现这一目标吗?
I'm trying to use Excel Power Query to filter down to only one combination of columns:
Example:
Original Table:
Header1 | Header2 |
---|---|
A | B |
B | A |
B | C |
Desired Result:
Header1 | Header2 |
---|---|
A | B |
B | C |
Could be any combination of AB/BA as long as there is only one.
I've included a link to a demo workbook with the unfinished query. I've been going crazy trying multiple methods to get this to work.
Can anyone lend their expertise to help get this working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
哪些确定最后两行要保留?我猜您是说Header1与Header2对,不考虑其余列?
通常,如果要创建唯一的对,基本上是
复合主键
- 可以使用table.group
在UI中 选择组,然后选择
Header1
和> header2
。现在,您有了一对不同的一对。表格
,或者您可以使用
What determines which of the last 2 rows is kept? I'm guessing you mean the pairs of Header1 with header2, not considering the remaining columns?
Normally if you want to create unique pairs, basically a
Composite Primary Key
-- you can useTable.Group
Choose group by in the UI, and select
Header1
andHeader2
. Now you have a distinct set of the pair.Table.Distinct
Or you can use
请参阅算法中的代码中的注释
。 png“ alt =”在此处输入图像说明”>
See comments in code for the algorithm