excel - 如何使 Excel Power Query 根据工作表中单元格的值过滤数据?
问题描述
所以这就是我能走多远
let
Source = Excel.Workbook(File.Contents("C:\Port Inventory.xlsx"), null, true),
#"All in one_Sheet" = Source{[Item="All in one",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"All in one_Sheet", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Switch", type text}, {"Port", type text}, {"Name", type text}, {"Column2", type text}, {"Column1", type any}, {"Status", type text}, {"Vlan", type any}, {"Duplex", type text}, {"Speed", type any}, {"Type", type text}, {"Description", type text}, {"Migrated", type text}}),
#"Filtered Rows" = #!"Table.SelectRows(#""Changed Type"", each [Switch] = 'Migration sheet'!D2)"
in
#"Filtered Rows"
我不知道如何在当前工作簿中引用工作表的单元格。我想这[Switch] = 'Migration sheet'!D2
需要在倒数第三行替换为其他内容
我想将此查询用作下拉列表的数据源。假设单元格 D2 包含我要过滤的值。这将在 Power Query 中使用,该 Power Query 将用作与 C2 相邻的单元格 (E2) 的淹没选项的列表
解决方案
推荐阅读
- python - 使用 SciKit Learn 将 K-Means 输出到 CSV - 给出集群名称
- sed - Vagrant provision sed 命令返回错误
- postgresql - 操作超时点网核心
- openstreetmap - 有没有办法获得分页的立交桥查询的结果?
- amazon-web-services - EC2 UserData 完成执行后 AWS Cloudformation 堆栈删除
- youtube - 用于 Web 应用程序的云视频存储
- android - 片段不隐藏
- linux - 如果文件不存在则创建一个文件并在该文件中写入0,否则什么都不做
- c# - 谓词返回所有项目
- python - 如何使 x 轴和 y 轴上的数字都清晰