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.
Alex_T - I like this example, but while this approach will help to display the parameters in the Power BI Report, it will change how the paramaters are maintained. This table of parameters is not Power BI parameters. They can't be updated before refreshing the Power BI Dataset. In this situations the paramaters are Imported from another centralised database or sharepoint list.
Hi Anonymous , yes I don't disagree! I do say they are not true parameters and my suggestion does come with its own set of disadvantages but unfortunately I'm not aware of any other way to manage values as a table.
I've had a brief look at the suggestions, there doesn't appear to be one about better parameter management, the ability to manage as a table or import/export parameters into a central repository would be rather nice. I might add this one unless yourself or rmsolfest beats me to it 🙂
- rmsolfest4 years agoAdvocate II
Please let me know if you add a suggested idea. I am planning to explore these options a little more. I will share any results or ideas that I submit.
Thanks all past and future contributors on this topic!