Forum Discussion
Power Bi - Edit Parameters
- 1 year ago
Hi Johnbl , Thank you for reaching out to the Microsoft Community Forum.
Please try this:
- Go to Modeling -> New Parameter -> What If Parameter. Set the Data Type to Whole Number (or Decimal if needed). Define the minimum and maximum range with the step size. Click OK
- Power BI will create a new table with values in the specified range and a slicer to allow users to select values. You will also get a measure like Parameter Value which holds the selected value from the slicer.
- Instead of using Slider_PQ directly in your Power Query, you can use the What-If Parameter measure in your DAX calculations. Create a new calculated column in your table using DAX.
- Add the slicer created by the What-If Parameter to your report. This slicer will allow end users to dynamically change the parameter value, and your visuals will update accordingly.
- Also please refer this document:
Use parameters to visualize variables - Power BI | Microsoft Learn
Thank you Omid_Motamedise for your prompt and appropriate response.
If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
You're facing a common limitation in Power BI: parameters in Power Query cannot be changed dynamically within a report by end users. Parameters can only be modified in Power Query (Transform Data) and require a refresh to apply changes. However, you can achieve a similar effect using alternative methods that work within a report:
Instead of a Power Query parameter, you can create a What-If Parameter in Power BI, which allows users to select a value dynamically without requiring a data refresh.
Steps to Create a What-If Parameter:
Go to Modeling > New Parameter > What If Parameter.
Set the Data Type to Whole Number (or Decimal if needed).
Define a minimum and maximum range with step size.
Click OK to generate the parameter table and measure.
Power BI will create:
A new table with values in the specified range.
A slicer to allow users to select values.
Use this parameter in DAX calculations to modify your visual dynamically.