How to Use What-If Analysis in Tableau

Cody Schneider

Ever wondered what would happen to your sales pipeline if your team's close rate increased by just 5%? Or how a 10% increase in your ad budget might impact Q4 revenue? These "what-if" questions are at the heart of smart business strategy, and Tableau can help you answer them visually. This article will walk you through how to use what-if analysis in Tableau to build interactive dashboards that explore potential outcomes, all without needing to edit your original data.

What is "What-If" Analysis, Anyway?

What-if analysis is simply a way to see the effect of changing certain variables in a formula or model. Instead of looking at a static report of what has happened, you're building a dynamic tool to explore what could happen. It allows you to substitute real and hypothetical data to see how the results change.

In a business context, this is incredibly powerful. You can move beyond historical reporting and into forward-looking forecasting and scenario planning. Here are a few common examples:

  • Sales: "What if we offer a 15% discount for the next month? How much additional revenue do we need to generate to make it profitable?"

  • Marketing: "What is the projected return on ad spend if we shift 20% of our budget from Facebook Ads to Google Ads?"

  • Finance: "What is the impact on our net profit if the cost of raw materials increases by 8% next quarter?"

By building this capability directly into your Tableau dashboards, you empower stakeholders to ask and answer their own questions, turning a passive report into an active analytical tool.

The Two Pillars of What-If Analysis in Tableau

To make this magic happen in Tableau, you rely on two core features working together: Parameters and Calculated Fields. Think of them as the engine and the controls of your what-if machine.

1. Parameters: The Interactive Controls

A parameter in Tableau is a dynamic, user-controlled placeholder. It’s like a variable in an equation that you, the user, can change on the fly. You can set it up as a slider, a dropdown list, or a text box. For what-if analysis, this is the "knob" or "lever" your audience will turn to input different values.

For instance, you could create a parameter called "Ad Spend Increase" that lets a user choose any percentage between 0% and 50%. On its own, the parameter does nothing. Its power comes from being connected to a calculated field.

2. Calculated Fields: The Logic Behind the Scenes

Calculated fields are where you define the logic of your analysis. This is where you write the formula that uses the value from your parameter. The calculated field takes the user's input from the parameter and applies it to your data to generate a new result.

Continuing the example, you'd create a calculated field named "Projected Revenue" with a formula like [Current Revenue] * (1 + [Ad Spend Increase]). Now, whenever the user changes the "Ad Spend Increase" parameter, the "Projected Revenue" calculation updates instantly.

Step-by-Step Guide: Building a Sales Commission Model

Let's walk through a practical example of building a simple what-if analysis to model sales commission. Imagine you're a sales manager who wants to see how changing the commission rate would affect total expenses and individual rep payouts.

For this walkthrough, we'll assume you have a simple dataset with columns for Sales Rep and Total Sales.

Step 1: Create the Parameter

First, we need to create the interactive control that will let us test different commission rates. This will be our parameter.

  1. In the Data pane on the left, right-click anywhere and select Create Parameter...

  2. The parameter configuration window will pop up. Let's fill it out:

    • Name: Give it a clear name, like Commission Rate %.

    • Data type: Since we're dealing with percentages, select Float. This allows for decimal points.

    • Current value: Set a default value. Let's start with 0.05 for 5%.

    • Allowable values: Select Range. This will create a slider control.

    • Range of Values:

      • Minimum: 0

      • Maximum: 0.20 (for 20%)

      • Step size: 0.01 (1% increments)

  3. Click OK. You'll now see your new parameter listed at the bottom of the Data pane.

Remember, this parameter doesn't do anything yet! It's just a variable waiting to be used.

Step 2: Create the Calculated Field

Next, we need to create the calculation that uses the Commission Rate % parameter to figure out the commission expense.

  1. Right-click in the Data pane again and select Create Calculated Field...

  2. Let's configure this calculation:

    • Name: Projected Commission

    • Formula: Type in [Total Sales] * [Commission Rate %]

    • Tableau recognizes the parameter as a dynamic value you can use in formulas just like a regular data field.

  3. Click OK. You'll see Projected Commission appear in the Measures section of your Data pane.

Step 3: Build Your Visualization

Now we have all the pieces we need. Let's put them on a worksheet to see our what-if model in action.

  1. Drag the Sales Rep dimension to the Rows shelf.

  2. Drag the Total Sales measure to the Columns shelf to create a basic bar chart showing sales by rep.

  3. Now, drag your new Projected Commission measure and drop it onto the Columns shelf, right next to SUM(Total Sales). You should now have two bar charts for each sales rep.

Things are taking shape, but the interactive part is still missing.

Step 4: Bring it All Together with the Parameter Control

The final step is to make the parameter visible and interactive on your dashboard.

  1. In the Data pane, find your Commission Rate % parameter.

  2. Right-click on it and select Show Parameter.

A slider control for "Commission Rate %" will appear on the right side of your worksheet. Try moving the slider! As you change the percentage, you'll see the Projected Commission bars grow and shrink in real-time, while the Total Sales bars remain static. You’ve just built a what-if analysis tool!

To make it even clearer, you can drag the Projected Commission measure onto the Label card on the Marks shelf to display the exact commission values on the bars.

Pro Tips for Better What-If Dashboards

Once you've mastered the basics, you can enhance your what-if analysis to provide even deeper insights.

Use Multiple Parameters

There's no limit to one parameter. You can expand your model to include multiple variables. For our sales commission example, you could add another parameter called Sales Growth %.

Your Projected Commission calculation could then become:

([Total Sales] * (1 + [Sales Growth %])) * [Commission Rate %]

Now, users can adjust both the expected sales growth and the commission rate to see the combined impact. This allows for much more nuanced and realistic scenario planning.

Compare Scenarios Visually

Bar charts are great, but you can get more creative. Try plotting both your baseline (current state) and your "what-if" scenario on the same axis as a dual-axis chart. This can make the difference between the two scenarios much more obvious.

You can also use calculated fields to find the variance. A formula like [Projected Sales] - [Current Sales] gives you the dollar difference, which you can then visualize using color or size.

Add Text and Titles that Update Dynamically

Make your dashboard even more professional by including the parameter value directly in your worksheet or dashboard title.

  1. Double-click the worksheet title to edit it.

  2. In the edit box, click Insert.

  3. Find your parameter name (e.g., Parameters.Commission Rate %) and select it.

Your title could now read: "Projected Commission at a <Parameters.Commission Rate %>, Rate." As the user moves the slider, the title will update automatically to reflect the current selection.

Final Thoughts

Building what-if analysis in Tableau transforms your dashboards from static reports into interactive tools for exploration and decision-making. By combining parameters with calculated fields, you can model future scenarios, test assumptions, and understand the potential impact of strategic choices before you make them.

We know that setting up these kinds of analyses can feel intimidating, especially when you need to combine data from multiple platforms like Salesforce, Google Analytics, and your advertising accounts. Sometimes, you just want to ask a question and get a straight answer without building everything from scratch. That's why we built Graphed. You can connect your marketing and sales data, and then simply ask in plain English, "Show me a dashboard projecting revenue if we increase our Facebook ad spend by 20%," and our AI will build the interactive dashboard for you instantly. No parameters to configure, no formulas to write.