I'm trying to learn how to use parameters in my Power Query queries.
The "main" query gets order data from an Excel table and I'm trying to build a Calendar table based on Order Dates in that query.
Normally I'd create the calendar table in the Power Pivot (yeah, I'm doing this in Power Pivot because Excel workbooks are much easier to spread around than the Power BI reports) but I want to include the public holidays in my Calendar so I'm using another query to get the holidays from a web service. For that I need the first and the last year from my Orders query so I've built a couple of queries that return the first / last year as a list:
Now I'd like to convert those queries as parameters but I can't select the Convert To Parameter -selection from the Query Settings. It doesn't seem to be grayed out but it just ignores my mouse cursor on that row. I could use the Create Function -option right before it but it just won't let me select the Convert To Parameter.
What am I doing wrong / How can I make it allow me to use the query as a parameter?
The "main" query gets order data from an Excel table and I'm trying to build a Calendar table based on Order Dates in that query.
Normally I'd create the calendar table in the Power Pivot (yeah, I'm doing this in Power Pivot because Excel workbooks are much easier to spread around than the Power BI reports) but I want to include the public holidays in my Calendar so I'm using another query to get the holidays from a web service. For that I need the first and the last year from my Orders query so I've built a couple of queries that return the first / last year as a list:
Code:
let Source = Orders,
#"Calculated Earliest" = Date.Year(List.Min(Source[OrderDate]))
in
#"Calculated Earliest"
Now I'd like to convert those queries as parameters but I can't select the Convert To Parameter -selection from the Query Settings. It doesn't seem to be grayed out but it just ignores my mouse cursor on that row. I could use the Create Function -option right before it but it just won't let me select the Convert To Parameter.
What am I doing wrong / How can I make it allow me to use the query as a parameter?