I found this video https://www.youtube.com/watch?v=YiKtgTkj8wk that provides basics but doesn't address the issue of the dropdown when more than 20 queries are present or how to deal with a query as the parameter.
Issues with Power Query Parameter Manager
Trying to use Excel Query Editor and its Parameter Manager in conjunction with the "Create Function" from Navigation pane on a query. In Parameter Manager the following issues: creating a parameter with "Suggested Values" = Query; the Query dropdown box: 1) does not list all of the query names in project; 2) dropdown box extends beyond the edge of the Parameter Manager dialogue box; 3) sometimes the dropdown box is hidden behind the task bar at the bottom of my screen. When "Suggested Values" is "Query", "Query" dropdown has a selected query name and "Current Value" has another query name and the parameter is passed to a function the error message is produced that says "We cannot convert the value of (a literal) to type Table. It is not clear why there needs to be a "Current Value" since a query is listed in the query box. To get the "Create Function" to recognize that a parameter exists it seems the parameter must be defined in Parameter Manager. The query type parameter is not passed to the "Create Function" or so it seems. The Parameter Manger Type box does not include type Table, even though it is normal to pass tables as arguments to functions. The "Any" type does not seem to support type Table. Please explain how this is supposed to work?
Community Center | Not monitored
3 answers
Sort by: Most helpful
-
-
Lz._ 9,016 Reputation points
2021-05-17T09:48:35.11+00:00 Hi @Anonymous
Re. I do not seem to be able to specify a table as a parameter to pass as an argument to a function
Not sure this is exactly what you're after but check this example where I have n queries, 2 of them begin of type table (Table1, Table2). My function requires a Table as input:(#"Select a table for this function" as table) => let Source = #"Select a table for this function", /* my function's next steps ... */ Result = "My function's result" in Result
When I click on the arrow down button next to the drop down list:
-
Anonymous
2021-05-24T16:50:49.04+00:00 The current value is only a place holder to satisfy the requirement for a default value. I should have used SofarTable as default. Sorry.