Power-Query-Result-Table
Pivot-Table on Power-Query-Result-Table
I am getting the list in the first screenshot as a result from the Power-Query-Editor
.
Now I want to apply a Report Filter
to it. Therfore, I put the data into a Pivot-Table
.
In general this solution is working but I am wondering if it is possible to have the Report Fitler
directly in the Power-Query-Result-Table
to avoid an additional Pivot-Table
?
CodePudding user response:
You can filter for crew directly in the PowerQuery using the drop down atop the crew column like below image. In this image I filter for Crew=J
That generates code as follows:
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Crew] = "J")
If you put J into a a cell on the excel sheet and gave that cell a range name like CrewName, you could reference that range name in the powerquery and filter dynamically
#"Filtered Rows"= Table.SelectRows(#"Changed Type", each [Crew] = Excel.CurrentWorkbook(){[Name="CrewName"]}[Content]{0}[Column1])