What If Parameters in Power BI Visuals

Cody Schneider

Power BI reports are great for showing what has happened, but their true power is unlocked when you can use them to explore what could happen. That's exactly where What-if parameters come in, turning your static dashboards into dynamic, interactive forecasting tools. This article will walk you through exactly how to create and use these parameters to model different scenarios and make smarter, data-informed decisions.

So, What Exactly Is a What-If Parameter?

Think of a What-if parameter as a special type of slicer - but instead of filtering your existing data, it acts as a user-controlled variable that you can plug directly into your calculations. It’s like having a control knob for your business metrics. Want to see how a 5% price increase might affect your total projected revenue? Or how a change in your website's conversion rate could impact lead generation? A What-if parameter lets you do this with a simple slider.

When you create one, Power BI generates:

  • A new table with a single column of numbers based on the range you define.

  • A DAX measure that captures the single value selected by the user on the slicer.

  • A slicer visual on your report page, ready to be used.

This simple setup is incredibly powerful for different types of scenario analysis, such as:

  • Sales Forecasting: Model revenue projections based on different commission rates or discount percentages.

  • Marketing Budgeting: Estimate the return on ad spend (ROAS) by inputting various advertising budgets.

  • Operations Planning: Analyze the impact of headcount changes or efficiency gains on operational costs.

  • E-commerce Analysis: Project total sales based on a variable conversion rate or average order value.

How to Create a What-If Parameter in Power BI (Step-by-Step)

Let’s build a common and straightforward example: a parameter to model the effect of a sales discount on total revenue. Follow these steps in Power BI Desktop.

1. Navigate to the Modeling Tab

First, open your Power BI report. In the top ribbon, click on the Modeling tab. This is where you'll find the tools for creating DAX measures, new tables, and, of course, parameters.

2. Click "New Parameter"

Within the Modeling tab, find the "Parameters" section and click the New parameter button. You’ll have two choices, select Numeric range. This will open the "Parameter" configuration window.

Here’s a breakdown of the fields you need to fill out:

  • Name: This is a critical step. Give your parameter a descriptive name that makes its purpose clear. For our example, we'll name it Discount Percentage. This name will be used for both the new table and the DAX measure Power BI creates.

  • Data type: Choose the type of number you need. You have three options:

    • Whole number: For integers (e.g., number of sales reps, units sold).

    • Decimal number: For numbers with fractional parts (e.g., percentages, prices). We'll choose this for our discount.

    • Fixed decimal number: A less common, high-precision type often used for financial calculations.

  • Minimum: The lowest value on your slider. For our discount, we’ll set this to 0 (representing a 0% discount).

  • Maximum: The highest value on your slider. Let’s set this to .25 to represent a maximum discount of 25%. Using decimals for percentages (e.g., 0.25 instead of 25) makes the DAX formulas cleaner later on.

  • Increment: This determines how much the value changes each time you move the slider one step. We’ll use a small increment like 0.01, so our user can adjust the discount by single percentage points.

  • Default: The starting value when the report first loads. Let’s set it to 0.

Finally, make sure the checkbox for "Add slicer to this page" is ticked. This is a huge time-saver as it automatically adds the fully functional slicer to your report canvas.

3. Review What Power BI Creates

Once you click "OK", Power BI works its magic and does two things for you in the background:

1. It creates a new calculated table. In the Data pane on the right, you'll see a new table named "Discount Percentage". If you inspect this table, you'll see it contains a single column (also named "Discount Percentage") populated with values from 0 to 0.25, incrementing by 0.01, just as we defined.

2. It creates a special DAX measure. This measure captures the value currently selected on the slicer. The DAX code is very simple:

The SELECTEDVALUE() function returns the selected value from the slicer. If no value (or more than one) is selected, it returns the optional second argument, which we set as the default (0). This is the measure you will use in your other calculations.

Putting Your What-If Parameter to Work with DAX

At this point, your slicer is visible on the page, but moving it won't do anything because it isn’t connected to any of your visuals or data models. The real magic happens when you build a new measure that uses the parameter’s value.

Let's assume you already have a basic measure that calculates your total sales, like this:

Total Sales = SUM(Sales[Revenue])

Now, we’ll create a new measure to calculate the projected revenue after applying the discount selected on our What-if slicer.

On the Home tab, click New Measure and enter the following DAX formula:

Let’s break down this formula:

  • [Total Sales] is our starting amount.

  • 'Discount Percentage'[Discount Percentage Value] is the dynamic value from our What-if parameter slicer (e.g., 0.10 for a 10% discount).

  • (1 - '... '[Value]) calculates the remaining portion after the discount. For a 10% discount, this would be (1 - 0.10) = 0.90.

  • Finally, we multiply our [Total Sales] by that portion to get the new, discounted total.

Visualizing the Impact

With our new measure created, it’s time to show the result. You can now use the Projected Revenue After Discount measure in any visual.

1. Use Card Visuals for a Clear View

The simplest way to see the impact is with Card visuals. Drag two Cards onto your report canvas. Put your original [Total Sales] measure in the first one and your new [Projected Revenue After Discount] measure in the second. Now, slide the "Discount Percentage" slicer back and forth. You'll see the "Projected Revenue" card update instantly in real-time. This provides an immediate, tangible connection between the user's input and the forecasted outcome.

2. Compare Original vs. Forecast in a Chart

Take it a step further by using a bar or column chart to visualize the difference across categories. For example:

  • Create a Clustered Column Chart.

  • Add "Product Category" to the X-axis.

  • Add both [Total Sales] and [Projected Revenue After Discount] to the Y-axis.

Now, as you adjust the discount slicer, you'll see the "Projected Revenue" bars for each category shrink accordingly, providing a powerful comparison against the original sales figures.

Best Practices for Using What-If Parameters

To make your reports intuitive and valuable, keep these tips in mind:

  • Descriptive Naming: Always use clear, descriptive names. Conversion Rate Goal % is infinitely better than Parameter1. Report viewers, and your future self, will thank you.

  • Set Realistic Ranges: Keep your minimum and maximum values within a logical range. A website conversion rate slider probably shouldn't go to 100%. This grounds your forecasts in reality and prevents absurd outputs.

  • Provide Context: Use titles and text boxes to clearly explain what each What-if parameter does. A simple title above the slicer like "Adjust Sales Discount %" is often enough to guide an end-user.

  • Combine Parameters for Advanced Models: You're not limited to one parameter. You could create one for "Unit Cost Change $" and another for "Volume Increase %" to model profitability. This lets you build more sophisticated and multi-dimensional scenario planning tools right inside Power BI.

Final Thoughts

What-if parameters in Power BI transform your static historical reports into interactive decision-making tools. By giving users a simple slider to control key variables, you empower them to explore potential outcomes, test assumptions, and understand the sensitivity of their business metrics without ever leaving the dashboard.

Building these scenarios in Power BI is a game-changer, but bringing all the necessary data together from platforms like Google Analytics, Shopify, your CRM, and more is often the first major challenge. At Graphed, we help you skip the manual data wrangling by connecting your tools in just a few clicks. You can ask forecasting questions in plain English - like "what would revenue be last month if our conversion rate was 3%?" - and get instant answers and visuals, letting you move from curiosity to clarity in seconds, not hours.