I have the following PowerQuery in Excel
let
Source = Excel.CurrentWorkbook(){[Name="Query1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Month Year", type date}}),
#"Custom Step" = Table.SelectRows(#"Changed Type", each [Month Year] = #date(2017, 12, 1))
in
#"Custom Step"
I would like to set this up so that #date(2017, 12, 1)) is a parameter. In other words, I want to have a filter/dropdown on a worksheet and whatever the user selects (December 2017, November 2016, etc.) I want the "Custom Step" to filter the table based on the selection.
Is there some sort of syntax that will allow me to use a parameter? (kinda like @variable in SQL)