简体   繁体   English

是否可以从 excel 中的一个电源查询中获得多个输出?

[英]Is it possible to get multiple outputs from one power query in excel?

I have one big query in a file.我在一个文件中有一个大查询。 I need to get multiple outputs from it with custom filters in multiple excel worksheets.我需要使用多个 excel 工作表中的自定义过滤器从中获取多个输出。 Is it possible to do it WITHOUT loading the whole query table to each worksheets and then filtering it (it would make the file very big).是否可以在不将整个查询表加载到每个工作表然后对其进行过滤的情况下执行此操作(这会使文件变得非常大)。 I know that it can be done manually by duplicating the query and filtering it inside query settings but ideally i would like to filter each table in each worksheet by parameters chosen from dropdown list...我知道它可以通过复制查询并在查询设置中过滤它来手动完成,但理想情况下我想通过从下拉列表中选择的参数过滤每个工作表中的每个表......

No need for VBA I believe, if you have your filter in your workbook you can load them in Powerquery directly.不需要 VBA 我相信,如果您的工作簿中有过滤器,您可以直接在 Powerquery 中加载它们。 Either with a table loaded or with named range加载表格或命名范围

Then keep you main query with the common part of all output and then reference it in other queries that you filter using your parameters loaded.然后让您使用所有 output 的公共部分的主要查询,然后在您使用加载的参数过滤的其他查询中引用它。

Loading a name cell in powerquery looks like:在 powerquery 中加载名称单元格如下所示:

Excel.CurrentWorkbook(){[Name="namedcell"]}[Content]{0}[Column1],

You can do an IF using it as well:您也可以使用它来执行 IF:

Table.SelectRows(#"Filtered Rows1", each [columntofilter] = Excel.CurrentWorkbook(){[Name="source_url"]}[Content]{0}[Column1])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM