How to Do Sensitivity Analysis in Tableau with AI
Sensitivity analysis is a powerful way to see how your business outcomes might change when key variables fluctuate. Instead of a static report, it gives you a dynamic model to answer "what-if" questions about your future performance. This tutorial will walk you through how to perform sensitivity analysis manually in Tableau using parameters and then explain how AI-powered tools are revolutionizing this process.
What Exactly Is Sensitivity Analysis?
At its core, sensitivity analysis (or "what-if" analysis) is a technique used to determine how different values of an independent variable will impact a particular dependent variable under a given set of assumptions. That might sound a bit academic, so let’s break it down with a simple business example.
Imagine you're an e-commerce store manager, and your profit is calculated as:
Profit = (Revenue) - (Cost of Goods Sold) - (Marketing Spend)
A static report might tell you last month's profit was $50,000. That's useful, but it doesn't help you plan for the future. Sensitivity analysis lets you ask forward-looking questions like:
- What if we increase our marketing spend by 15%? How will that affect our profit, assuming a conservative revenue lift?
- What if our supplier raises the cost of goods by 10%? What happens to our bottom line?
- What if we can boost our conversion rate by 0.5%? What's the potential impact on total revenue?
By tweaking these input variables, you can see the potential range of outcomes for your key metrics - like profit, revenue, or customer acquisition cost. This transforms your dashboards from historical records into strategic forecasting tools. It helps you prepare for uncertainty, identify risks, and understand which business levers have the most significant impact on your success.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
The Traditional Way: Building a Sensitivity Analysis Dashboard in Tableau
Tableau’s parameters are the key to building an interactive what-if analysis. Parameters are essentially variables that you, the user, can control. By linking these parameters to your calculations, you can create dynamic visualizations that respond to your inputs in real time. Let’s build a basic model to see how it works.
For this example, let's say we have regional sales data and we want to create a model to forecast sales with a user-adjustable growth rate.
Step 1: Create a Parameter
First, you need to create the control that allows a user to input their assumption. In this case, it's the sales growth forecast.
- In the Data pane on the left, click the small dropdown arrow and select Create Parameter.
- A configuration window will pop up. Give your parameter a clear name, like "Sales Growth Forecast %".
- Set the Data type to Float, which allows for decimal points.
- Set the Display format to Percentage.
- Configure the Allowable values. Select Range.
- Click OK. You’ll now see your "Sales Growth Forecast %" parameter in the bottom-left of your Data pane.
Right-click the new parameter and select Show Parameter. A slider control will appear in your worksheet view, allowing you to select a value between -50% and +50%.
Step 2: Create a Calculated Field Using the Parameter
The parameter itself doesn't do anything yet. You need to connect it to your data through a calculated field. This calculation will take the current sales and apply the growth forecast from the parameter.
- Click the dropdown arrow in the Data pane again and select Create Calculated Field.
- Name it something descriptive, like "Forecasted Sales".
- The formula is where you connect your base measure (Sales) to your parameter. The formula will be:
[Sales] * (1 + [Sales Growth Forecast %])- This formula takes the original sales amount for each row of data and multiplies it by one plus the percentage selected in your parameter. For example, if you set the parameter to 10% (0.10), it will calculate
[Sales] * 1.10. - Click OK.
Step 3: Visualize Your What-If Scenario
Now you have everything you need to build the interactive visualization. You can bring both your original sales and your new forecasted sales onto a chart to compare them.
- Drag your "Region" dimension to the Columns shelf.
- Drag the default "Sales" measure to the Rows shelf.
- Drag your new "Forecasted Sales" calculated field to the Rows shelf, placing it next to Sales. Tableau will likely create two separate bar charts.
- To combine them, right-click the "Forecasted Sales" axis and select Dual Axis.
- Right-click the second axis again and select Synchronize Axis to make sure both measures are on the same scale.
- In the Marks card, you can change the mark type for "Sales" to be a Bar and "Forecasted Sales" to be a different shape (like a Gantt bar or a circle) to easily distinguish them.
Now, when you interact with the "Sales Growth Forecast %" slider you showed in Step 1, you will see the "Forecasted Sales" marks on your chart move up and down in real-time. You've successfully built a basic sensitivity analysis model!
Where AI Changes the Game for Sensitivity Analysis
The parameter method in Tableau is incredibly effective, but it has one fundamental limitation: you have to know which variables to test ahead of time. You decided to test the impact of a "Sales Growth Forecast," but what if the most important drivers of your business are actually shipping costs, website traffic, or product return rates?
Manually exploring every single possibility is impractical. This is where AI analytics tools dramatically enhance the process. AI doesn't just help you visualize scenarios you've already thought of, it helps you uncover the most critical variables to analyze in the first place.
Identifying Key Drivers Automatically
Instead of guessing which metrics matter most, you can connect your data sources to an AI tool and simply ask. Querying something like, "What factors had the biggest positive and negative impacts on my profit last quarter?" prompts the AI to run complex regression analysis on its own. It might come back with a surprising insight, such as: "While ad spend was a contributor, average session duration had a 3x greater impact on conversion rate." This insight instantly tells you that session duration is a critical variable you should model in your sensitivity analysis.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Automating Complex, Multi-Variable Scenarios
Manually building a model in Tableau that involves multiple changing variables can become complicated very quickly. You’d need several parameters and a tangled web of calculated fields. What if you want to know the profit impact of increasing ad spend by 20% on one social platform, decreasing it by 10% on another, while also offering a 5% promotional discount? Answering this with parameters is a chore.
With an AI tool, you can ask this question in plain English. The AI can process the multi-layered scenario, pull the correct data from your various connected platforms (e.g., Facebook Ads, Google Ads, Shopify), and generate a direct visualization of the outcome in seconds.
A Modern Workflow: Combining the Best of Tableau and AI
The goal isn't to replace Tableau entirely but to use AI to augment and accelerate the process of building powerful, C-suite-ready dashboards. Here’s a more efficient workflow:
- Explore with AI First: Connect all your relevant data sources (marketing, sales, product analytics) to an AI analytics platform. Start by asking broad, exploratory questions in natural language. For instance, "What are the common attributes of our highest LTV customers?" or "Identify performance trends across all my marketing campaigns for the last 6 months."
- Identify the Most Impactful Variables: The AI will analyze the data and surface the key metrics that are truly driving performance. It acts as an expert data analyst, pointing you toward the handful of variables that have an outsized impact on your goals, saving you from having to test dozens of less relevant metrics.
- Build Targeted Tableau Dashboards: Armed with this knowledge, you can go into Tableau and build a much more relevant and focused sensitivity analysis dashboard. You’re no longer guessing. You can now build dedicated parameters for the two or three drivers that AI proved were most critical to your business outcomes. Your dashboard becomes sharper, more valuable, and less cluttered.
- Answer Follow-Up Questions Instantly with AI: When you present your new dashboard, stakeholders will inevitably have follow-up questions you didn't anticipate. "This is great, but can we see this broken down by our enterprise customer segment?" Instead of going back to the drawing board in Tableau, you can turn to your AI tool, ask the question in plain English, and get the answer on the spot.
Final Thoughts
By blending the structured, interactive visualizations of tools like Tableau with the exploratory and analytical speed of AI, you can deliver deeper insights, faster. Building manual what-if models using parameters remains a valuable skill, but using AI to inform what variables you should be modeling helps you focus your efforts where they'll have the most significant impact.
At Graphed, we built a tool to shortcut this exact process. Instead of tedious manual setup, you can connect your marketing, sales, and analytics platforms in just a few clicks. From there, you can ask complex, multi-variable "what-if" questions using natural language. This allows us to handle the work of identifying key relationships in your data and building the corresponding reports for you, so you can spend less time wrangling calculations and more time making informed strategic decisions.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.