What-If Parameters In Power BI

  • Published
  • Posted in Power BI
  • Updated
  • 2 mins read
  • Tagged as

In Power BI, you can create and use What-if parameters for your report, interact with the parameter as a slicer, and visualize key values in your report.

In this blog, I’ll be showing how to create a what-if parameters & explain a use case where this can come handy.

Blog Structure:

  • Intro to the Dataset
  • Creating What-if Parameters
  • Using What-if Parameters
  • Conclusion

Intro to the Dataset

For this example, I have taken a sample sales prediction data which predicts the sales based on the conditions present in columns ‘RA’, ‘A’ & ‘SB’.

I’ll not be going into much details about the model itself but will rather be concentrating on the report we’ll be creating in Power BI. We need to use the above conditions as parameters to provide a smooth interface in the Power BI report. So, let’s get started.

Creating What-if Parameters

To create a what-if parameter, select New Parameter from the Modeling tab in Power BI Desktop.

For this example, I have created 3 parameters representing the columns ‘RA’, ‘A’ & ‘SB’ and set all their data type to Whole number. For all the parameters, the Minimum value is one & the Maximum is ten. I’ve set the Increments to 1. That’s how much the parameter will adjust when interacted with in a report.

You may notice that in addition to creating the parameter, creating a what-if parameter also creates a measure, which you can use to visualize the current value of the what-if parameter.

Using What-if Parameters

Now let’s create a measure which will be a simple Sum of the Sales dependent on the 3 newly created parameters.

Next, we will create the visualizations. To start, create 3 slicers by dragging the columns generated in each What-if parameter to the visualizing canvas.

Then, create a visual with the measure that we created in the previous step. In our case, a card.

Here’s how the final report looks like:

As we move the sliders in each of the parameters, the Sales will reflect the change.

Conclusion

What-if parameters allow the users to interact with the reports in a way that a normal slicer doesn’t allow. What-if parameters can be used in various situations to handle different issues as well.

Karan Nair
Team Lead – Data Analytics
Addend Analytics

Addend Analytics is a Microsoft Gold Partner based in Mumbai, India, and a branch office in the U.S.

Addend has successfully implemented 100+ Microsoft Power BI and Business Central projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia.

Get a free consultation now by emailing us or contacting us.