Report parameters
Report parameters are a new Power BI Desktop feature that allows you to create dynamic slicers with which you can influence the appearance of the report. In the previous “recipe”, you could see how it looks when we create field parameters, and now you will find out how to make those that contain numerical values. We will create a parameter that describes the sales target, then we will change it and see how it affects the chart…
We added sales dataset and made a simple column chart visual. The names of the months are shown on its x-axis, and the sum of sold quantities on the y-axis.
We will go to the Modeling ribbon, and select Numeric Range from the New Parameter menu.
We will name the parameter: Target. Let the initial value be 0, the maximum value 25000, and the step value 100. After we create the parameter, Power BI will automatically add the slicer. This is the default action, because we have a check box with determines to always add a slicer after creating a new parameter. We will format the slicer according to our preferences…
Then the visualization should be changed to Combo (Column+Line). We will add the newly created parameter to the field used to determine the y axis of the line. The horizontal line on the chart represents the sales target. If, with the help of the slicer, we change the target values, the appearance of the chart will also change automatically.