Forum Discussion
PBI Power Query suggestions: Create one table of all Power Query parameters
- 4 years ago
MY RESULTING SOLUTION:
I decided to hardcode the parameters and there values into a Power Query Parameters table using sample code below.
let // Consolidated table of parameter values (type text) for use in DAX measures or PBI visualizations Source = #table( type table [ #"ParameterName"=text, #"Value_text"=text ], { {"p_ParameterName1", p_ParameterName1}, {"p_ParameterName2", p_ParameterName2}, {"p_ParameterName3", p_ParameterName3}, ... {"p_ParameterNameN", p_ParameterNameN} } ) in Source
Although the ParameterNames are hardcoded for inclusion on each row of the table, their values are automatically updated when the parameter values are updated in PBI Desktop or on the Service.Thanks all responders above for your thoughtful ideas. Even though I decided to go another way, these ideas were helpful for me to explore the possibilities and others still may use them in their solutions.
MY RESULTING SOLUTION:
I decided to hardcode the parameters and there values into a Power Query Parameters table using sample code below.
let
// Consolidated table of parameter values (type text) for use in DAX measures or PBI visualizations
Source = #table(
type table
[
#"ParameterName"=text,
#"Value_text"=text
],
{
{"p_ParameterName1", p_ParameterName1},
{"p_ParameterName2", p_ParameterName2},
{"p_ParameterName3", p_ParameterName3},
...
{"p_ParameterNameN", p_ParameterNameN}
}
)
in
Source
Although the ParameterNames are hardcoded for inclusion on each row of the table, their values are automatically updated when the parameter values are updated in PBI Desktop or on the Service.
Thanks all responders above for your thoughtful ideas. Even though I decided to go another way, these ideas were helpful for me to explore the possibilities and others still may use them in their solutions.