You can use What-If parameters or Power BI Parameters in conjunction with Power BI bookmarks and dynamic filtering to enable users to modify Power Query parameters straight from the Power BI report interface (without launching the Power Query Editor).
Here's how to do it:
Steps: Set up Power Query parameters:
Navigate to Home > Manage Parameters > New Parameter in Power BI Desktop.
Make the desired parameter (filter value, date range, etc.). The data transformation will be dynamically controlled by this parameter.
Utilize Power Query Parameters:
Use the parameter in your Power Query transformations after it has been created. It can be used, for instance, to modify connection strings, filter data, and manage other query elements.
Apply the parameter by referencing it in your query steps (e.g., in filtering or sorting operations).
Expose Parameters in the Report Interface:
To make the parameters adjustable from the report interface, you can use What-If parameters or ** slicers** that control the parameter values.
Slicers based on the parameter can be made and used to dynamically update data filtering.
Configure Updates for Dynamic Data:
To create dynamic parameters in Power BI Desktop, select Modeling > New Parameter.
Connect these parameters to your report's images. Make a Slicer for a date range parameter or numeric input, for instance, so that users can work with the parameter straight from the report.
Make use of Power BI bookmarks (optional):
Use Power BI Bookmarks to store and quickly switch between parameter settings if the parameter governs a complicated transformation or visualization state.