不同数据集/列的切片器过滤问题
创始人
2025-01-09 17:09:22
0

这个问题的解决方法可以采用 Power Query 实现数据合并来解决。 例如,你有两张表格:一张是销售表格,一张是产品表格,有一个共同的字段是 “产品 ID”。 首先,你需要将这两个表格合并起来,如下所示:

let Source1 = Excel.Workbook(File.Contents("C:\Desktop\Sales.xlsx"), null, true), Sales_Table = Source1{[Item="Sales",Kind="Table"]}[Data],

Source2 = Excel.Workbook(File.Contents("C:\Desktop\Products.xlsx"), null, true),
Products_Table = Source2{[Item="Products",Kind="Table"]}[Data],

Merge_Tables = Table.NestedJoin(Sales_Table,{"ProductID"},Products_Table,{"ProductID"},"Products",JoinKind.LeftOuter),
Expanded_Products = Table.ExpandTableColumn(Merge_Tables, "Products", {"ProductName"}, {"ProductName"}),
Sorted_Table = Table.Sort(Expanded_Products,{{"OrderDate", Order.Ascending}})

in Sorted_Table

然后,你可以将合并后的表格与切片器连接起来,将 “产品名称” 作为切片器的一个选项,如下所示:

let Source1 = Excel.Workbook(File.Contents("C:\Desktop\Sales.xlsx"), null, true), Sales_Table = Source1{[Item="Sales",Kind="Table"]}[Data],

Source2 = Excel.Workbook(File.Contents("C:\Desktop\Products.xlsx"), null, true),
Products_Table = Source2{[Item="Products",Kind="Table"]}[Data],

Merge_Tables = Table.NestedJoin(Sales_Table,{"ProductID"},Products_Table,{"ProductID"},"Products",JoinKind.LeftOuter),
Expanded_Products = Table.ExpandTableColumn(Merge_Tables, "Products", {"ProductName"}, {"ProductName"}),
Sorted_Table = Table.Sort(Expanded_Products,{{"OrderDate", Order.Ascending}}),

// Connect to the Slicer

Product_Slicer = Excel.CurrentWorkbook(){[Name="Product_Slicer"]}[Content

相关内容

热门资讯

揭秘几款(Wepoke渠道)外... 揭秘几款(Wepoke渠道)外挂透明挂辅助神器(透视)的确是真的有挂(2022已更新)(哔哩哔哩);...
大家学习交流(WepokE)外... 大家学习交流(WepokE)外挂透明挂辅助APP(透视)发牌机制(有挂神器)-哔哩哔哩准备好在Wep...
记者揭秘(德州ai智能系统)外... 【福星临门,好运相随】;记者揭秘(德州ai智能系统)外挂透明挂辅助工具(透视)透视辅助(真是有挂)-...
透视玄学!we辅助poker德... 透视玄学!we辅助poker德之星(wepoKe)外挂透明挂辅助机制(透视)爆料教程(有挂技巧)-哔...
免费测试版(Wepoke苹果版... 免费测试版(Wepoke苹果版)外挂透明挂辅助APP(透视)软件透明挂(有挂工具)-哔哩哔哩;建议优...
透明安装(wepoke规律)外... 透明安装(wepoke规律)外挂透明挂辅助app(辅助挂)透视辅助(有挂技术)-哔哩哔哩;揭秘教程安...
查到实测辅助(Wepoke开发... 此外,数据分析德州(Wepoke开发)辅助神器app还具备辅助透视行为开挂功能,通过对客户Wepok...
记者揭秘(wepoKE)外挂透... 记者揭秘(wepoKE)外挂透明挂辅助神器(透视)辅助透视(揭秘有挂)-哔哩哔哩;是一款可以让一直输...
分享认知(微扑克苹果版)外挂透... 分享认知(微扑克苹果版)外挂透明挂辅助器(辅助挂)透视辅助(有挂方略)-哔哩哔哩1、许多玩家不知道微...
一起来探讨!wpk微扑克智能(... 大家肯定在之前wpk微扑克智能或者wpk微扑克智能中玩过一起来探讨!wpk微扑克智能(wepOke)...