What-If Analysis in Tableau
Learn how to use Tableau parameters and calculated fields to evaluate different business scenarios, compare outcomes, and support data-driven decision-making.
1. Introduction to What-If Analysis
What-If Analysis is a business analysis technique that allows users to understand how changing one or more input values can affect a calculated result. It helps organizations evaluate possible scenarios before making important business decisions.
In Tableau, What-If Analysis can be implemented using parameters, calculated fields, filters, and interactive dashboard controls. Users can change values such as sales targets, discount percentages, product prices, costs, or growth rates and immediately observe the calculated results.
For example, a sales manager may want to understand how a 5%, 10%, or 15% discount affects revenue and profit. Instead of manually changing calculations, the manager can use a parameter control to test different discount scenarios.
2. Why Is What-If Analysis Important?
Businesses regularly make decisions under changing conditions. What-If Analysis helps decision-makers understand the possible impact of different assumptions before implementing a strategy.
Common Business Questions
- What happens if product prices increase by 10%?
- How will profit change if operating costs increase?
- What happens if the company offers a 15% discount?
- How much revenue can be generated with higher sales targets?
- How will profit change if product demand decreases?
- What happens if the company increases its marketing budget?
Benefits of What-If Analysis
- Supports better business planning.
- Helps compare alternative scenarios.
- Improves financial and sales analysis.
- Allows users to test different assumptions.
- Reduces manual calculation work.
- Improves interactive dashboard functionality.
- Helps identify potential risks and opportunities.
3. Core Concepts of What-If Analysis
3.1 Input Variable
An input variable is a value that users can change to test a particular scenario. In Tableau, a parameter is commonly used to store this selected value.
Example: Discount Percentage, Sales Target, Product Price, or Operating Cost.
3.2 Assumption
An assumption represents a hypothetical condition used during analysis. For example, a business may assume that product demand remains constant when testing a price increase.
3.3 Calculation
A calculated field uses the selected parameter value and existing dataset fields to calculate the scenario result.
3.4 Scenario Result
A scenario result is the calculated output generated using the selected assumptions. Examples include projected revenue, adjusted profit, and discounted sales.
4. What-If Analysis Workflow
What-If Analysis follows a simple workflow. Users select a hypothetical value, Tableau uses it in a calculated field, and the visualization displays the resulting scenario.
SVG Diagram 1: What-If Analysis workflow using Tableau parameters.
5. Role of Parameters in What-If Analysis
Parameters are one of the most important components of What-If Analysis in Tableau. They allow users to change a selected value without modifying the original dataset.
Common Parameter Types
| Parameter Type | Example | Business Application |
|---|---|---|
| Integer | Sales Target = 100000 | Target comparison |
| Float | Discount = 0.10 | Discount analysis |
| String | Scenario = Optimistic | Scenario selection |
| Boolean | Include Tax = True | Conditional calculations |
| Date | 01-Jan-2027 | Date-based scenario analysis |
How Parameters Help
- Store user-selected hypothetical values.
- Allow users to change calculation inputs.
- Support interactive dashboard controls.
- Can be reused in multiple calculated fields.
- Help compare different business assumptions.
6. Practical Example: Discount Impact Analysis
Suppose an organization sells products and wants to understand how different discount percentages affect the final sales amount.
Sample Dataset
| Product | Original Sales | Product Cost |
|---|---|---|
| Laptop | ₹1,00,000 | ₹65,000 |
| Mobile | ₹60,000 | ₹38,000 |
| Monitor | ₹40,000 | ₹25,000 |
| Keyboard | ₹10,000 | ₹6,000 |
Step 1: Create a Discount Parameter
Create a parameter with the following properties.
- Name: Discount Percentage
- Data Type: Float
- Current Value: 0.10
- Allowable Values: Range
- Minimum: 0.00
- Maximum: 0.50
- Step Size: 0.05
Step 2: Create a Calculated Field
Create a calculated field named Discounted Sales.
SUM([Sales]) * (1 - [Discount Percentage])
Step 3: Create a Profit Calculation
Create another calculated field named Scenario Profit.
SUM([Sales]) * (1 - [Discount Percentage])
- SUM([Product Cost])
Step 4: Display the Parameter
- Right-click Discount Percentage in the Data pane.
- Select Show Parameter.
- Choose a suitable control style.
- Display Discounted Sales in the visualization.
- Also display Scenario Profit for comparison.
Step 5: Test Different Discount Values
Change the discount parameter to 0%, 10%, 20%, and 30%. Observe how discounted sales and scenario profit change.
7. Comparing Multiple Business Scenarios
Businesses often compare multiple hypothetical scenarios before selecting a strategy. Tableau can use a String parameter with predefined scenario options and a calculated field to switch between assumptions.
Example: Business Growth Scenarios
| Scenario | Growth Rate | Purpose |
|---|---|---|
| Conservative | 5% | Lower growth assumption |
| Moderate | 10% | Expected growth assumption |
| Optimistic | 20% | Higher growth assumption |
Step 1: Create a Scenario Parameter
- Name: Growth Scenario
- Data Type: String
- Allowable Values: List
- Values: Conservative, Moderate, Optimistic
Step 2: Create a Growth Rate Calculation
CASE [Growth Scenario]
WHEN "Conservative" THEN 0.05
WHEN "Moderate" THEN 0.10
WHEN "Optimistic" THEN 0.20
END
Step 3: Calculate Scenario Revenue
SUM([Sales]) * (1 + [Growth Rate])
The calculation applies the growth rate selected by the user to the current sales value.
8. Business Scenario Comparison Diagram
The following diagram shows how different assumptions can produce different calculated business outcomes.
SVG Diagram 2: Comparing conservative, moderate, and optimistic scenarios.
9. Practical Example: Sales Target What-If Analysis
A sales manager wants to change the sales target and understand whether the current sales performance meets the selected target.
Step 1: Create Sales Target Parameter
- Name: Sales Target
- Data Type: Integer
- Current Value: 100000
- Allowable Values: Range
- Minimum: 10000
- Maximum: 500000
- Step Size: 10000
Step 2: Create Target Status Calculation
IF SUM([Sales]) >= [Sales Target] THEN
"Target Achieved"
ELSE
"Target Not Achieved"
END
Step 3: Create Target Difference
SUM([Sales]) - [Sales Target]
Step 4: Build the Visualization
- Drag Region to Columns.
- Drag Sales to Rows.
- Show the Sales Target parameter.
- Add Target Status to Color or Label.
- Display Target Difference in the view.
- Change the target value and review the results.
10. What-If Analysis Dashboard Structure
A professional What-If Analysis dashboard combines parameter controls, key performance indicators, and scenario comparison charts.
SVG Diagram 3: Example layout of an interactive What-If Analysis dashboard.
11. Financial What-If Analysis
What-If Analysis is useful for financial planning because organizations can evaluate how changes in revenue, costs, discounts, and expenses affect profitability.
Example: Operating Cost Analysis
Suppose a company wants to understand how an increase in operating expenses affects its profit.
Create an Operating Cost Increase Parameter
- Name: Cost Increase Percentage
- Data Type: Float
- Current Value: 0.10
- Minimum: 0.00
- Maximum: 0.50
- Step Size: 0.05
Create Adjusted Cost
SUM([Operating Cost]) *
(1 + [Cost Increase Percentage])
Create Adjusted Profit
SUM([Revenue]) -
(
SUM([Operating Cost]) *
(1 + [Cost Increase Percentage])
)
Users can increase the cost parameter and observe how the calculated profit changes under different expense assumptions.
12. Types of What-If Scenarios
12.1 Best-Case Scenario
A Best-Case Scenario uses favorable assumptions to understand the potential result under positive business conditions.
Example: Higher sales growth and lower operating costs.
12.2 Worst-Case Scenario
A Worst-Case Scenario uses less favorable assumptions to evaluate possible risks.
Example: Lower sales revenue and higher operating costs.
12.3 Expected Scenario
An Expected Scenario uses assumptions considered reasonable for the business planning exercise.
Example: Moderate sales growth and expected operating expenses.
| Scenario | Sales Growth | Cost Change | Purpose |
|---|---|---|---|
| Best Case | 20% | 0% | Evaluate favorable conditions. |
| Expected Case | 10% | 5% | Evaluate normal assumptions. |
| Worst Case | -5% | 15% | Evaluate business risks. |
13. Limitations and Important Considerations
- What-If Analysis depends on the assumptions supplied by users.
- Calculated results are hypothetical, not guaranteed outcomes.
- Parameters store selected values and do not automatically change source data.
- Incorrect assumptions can produce misleading results.
- Multiple parameters may increase calculation complexity.
- Different scenarios should use consistent calculation logic.
- Large datasets may affect dashboard responsiveness.
- External factors not represented in the dataset are not automatically considered.
14. Common Problems and Troubleshooting
Problem 1: Parameter Changes Do Not Update the Result
Reason: The parameter may not be referenced in the calculated field used by the worksheet.
Solution: Verify the parameter reference and confirm that the calculated field is used in the view.
Problem 2: Incorrect Scenario Results
Reason: The calculation may use an incorrect formula or an unsuitable assumption.
Solution: Review the business formula, parameter values, aggregation, and sample calculations.
Problem 3: Parameter Values Are Not Available
Reason: The allowable values configuration may restrict the available selections.
Solution: Check the parameter properties and update the range, list, or allowable values.
Problem 4: Profit Becomes Negative
Reason: The selected scenario may result in expenses exceeding revenue.
Solution: Verify the calculations and examine the scenario assumptions. A negative result may also be a valid business outcome.
Problem 5: Dashboard Performance Is Slow
Reason: Complex calculations, large datasets, or multiple worksheets may affect performance.
Solution: Optimize calculations, reduce unnecessary visual elements, and review data-source performance.
15. Best Practices for What-If Analysis
- Use meaningful parameter names and descriptions.
- Choose realistic parameter ranges.
- Use correct formulas for business calculations.
- Validate calculations using sample values.
- Clearly label hypothetical scenario results.
- Compare multiple scenarios when useful.
- Use appropriate currency and percentage formatting.
- Display important KPIs in the dashboard.
- Keep parameter controls easy to understand.
- Document assumptions used in scenario calculations.
- Test edge cases such as zero values and negative results.
- Review performance before publishing the dashboard.
16. Practical Exercises
Exercise 1: Discount Impact Analysis
Create a discount parameter that supports values from 0% to 50%. Calculate discounted sales and scenario profit for different discount percentages.
Exercise 2: Sales Target Analysis
Create a sales target parameter and calculate whether each region achieves the selected target amount.
Exercise 3: Business Growth Scenarios
Create Conservative, Moderate, and Optimistic scenarios using a String parameter. Calculate adjusted revenue for each scenario.
Exercise 4: Operating Cost Analysis
Create a cost increase parameter and calculate adjusted profit when operating costs increase by different percentages.
Exercise 5: Build a What-If Dashboard
Build a dashboard containing discount, sales target, and growth scenario controls. Display the calculated revenue, profit, and scenario comparisons.
Summary
What-If Analysis in Tableau allows users to evaluate hypothetical business scenarios by changing input values and observing their impact on calculated results. Parameters are commonly used to control values such as discount percentages, sales targets, growth rates, and operating costs, while calculated fields process these inputs to generate scenario results. Businesses can use this technique for sales planning, financial analysis, cost evaluation, and comparing best-case, expected, and worst-case scenarios. By combining parameters, calculations, and interactive dashboards, Tableau helps users explore business assumptions and make more informed decisions. Accurate formulas, realistic assumptions, and clear presentation are essential for reliable What-If Analysis.