How to Do Predictive Analysis in Tableau with AI
Looking at historical data is useful, but being able to predict what’s coming next is a game changer. If you've ever wanted to forecast future sales, customer behavior, or campaign performance without getting a degree in data science, you’re in the right place. We're going to walk through how you can use the AI-powered predictive analysis features right inside Tableau to move from rearview reporting to forward-looking strategy.
First Things First: What is Predictive Analytics?
Before we jump into the "how," let's quickly cover the "what." In simple terms, predictive analytics is the practice of using your existing data to uncover trends and patterns to predict future outcomes. Instead of just reporting that sales were $50,000 last quarter, you can forecast that they're likely to be between $55,000 and $60,000 next quarter and understand the factors driving that prediction.
Think of it like a weather forecast for your business. Meteorologists don't just guess, they analyze historical weather patterns, atmospheric pressure, and wind speeds to predict if you'll need an umbrella tomorrow. Similarly, predictive analytics helps you answer questions like:
Which customers are most likely to stop using our service in the next six months?
How much inventory of a particular product should we stock for the upcoming holiday season?
Which marketing channel is most likely to deliver the highest ROI on our next campaign?
This proactive approach allows you to make smarter, data-driven decisions. Instead of reacting to a drop in sales, you can see it coming and take action to prevent it. Tableau makes this remarkably accessible, even for those who don’t speak in statistics.
Your Starting Point: Tableau's One-Click Forecasting
The easiest entry point to predictive analysis in Tableau is its built-in forecasting feature. It’s perfect for spotting trends and making quick projections based on time-series data (any data that has a date or time component). It uses a statistical technique called exponential smoothing, but the good news is you don't need to know the math behind it to get value from it.
Let's say you want to forecast your company's sales for the next year. Here’s how you’d do it in just a few clicks:
Step 1: Create a Time-Series VisualizationFirst, you need a line chart showing a measure over time. Drag a date field (like Order Date) to the Columns shelf and a measure you want to forecast (like SUM(Sales)) to the Rows shelf. Ensure your date field is set to a continuous measure, like Month or Quarter (it will show up as a green pill in Tableau).
Step 2: Drag "Forecast" onto Your ViewOn the left side of your screen, click on the Analytics pane (next to the Data pane). Under the "Model" section, you’ll see an option for Forecast. Simply click and drag this item onto your chart view.
Instantly, Tableau extends your line chart into the future. You’ll see a new section of the line representing the forecast, often shaded to indicate the prediction interval. You’ve just made your first prediction!
Understanding and Customizing Your Forecast
The output Tableau provides is beautifully simple. The extended line is the actual forecast, while the shaded area around it is the prediction interval. This interval represents the range where Tableau expects the actual values to fall (with a default 95% confidence). A wider interval means more uncertainty, a narrower one means the prediction is more confident.
To fine-tune your forecast, right-click anywhere on the forecast area and select Forecast > Forecast Options. A pop-up will appear where you can adjust things like:
Forecast Length: You can tell Tableau how far into the future to predict (e.g., "the next 6 months").
Source Data: You can choose to ignore the last period of data if you know it was an anomaly (like a one-time flash sale).
Forecast Model: You can let Tableau automatically detect seasonality or manually specify it if you know your business runs on a specific cycle (e.g., a 12-month sales cycle).
This one-click method is incredibly fast and effective for getting a basic read on where trends are headed. Its main limitation is that it only considers time as a predictor. But what if other factors, like your marketing spend or discount rates, influence your sales? For that, we need to level up.
Leveling Up: Using Tableau's Predictive Modeling Functions
When you need more sophisticated predictions that account for multiple business drivers, you can use Tableau’s predictive modeling functions directly in calculated fields. The two primary functions are MODEL_PERCENTILE and MODEL_QUANTILE. They allow you to build regression models to understand how different variables (your "predictors") relate to a target outcome.
Let's put this into practice. Imagine you want to predict your monthly sales not just based on the calendar, but also based on how much profit you made and how much you spent on ads. You believe profitable months with high ad spend lead to even better sales the next month.
Here’s how to build a simple model to test that theory using MODEL_QUANTILE.
Step 1: Create a New Calculated FieldGo to the top menu and select Analysis > Create Calculated Field. Let’s name this calculation "Predicted Sales."
Step 2: Write the Prediction FormulaIn the calculation editor, you’ll build your prediction a lot like you would an Excel formula. Here’s what it would look like:
MODEL_QUANTILE(
0.5,
SUM([Sales]),
SUM([Profit]), SUM([Ad Spend])
)
This might look a little intimidating, but it’s quite straightforward once you break it down:
MODEL_QUANTILE: This is the name of the predictive function we're using.0.5: This is the quantile we want to predict. A quantile of 0.5 represents the median (or 50th percentile), giving you the most likely "middle" prediction. If you wanted a more optimistic or pessimistic forecast, you could change this to something like 0.75 or 0.25.SUM([Sales]): This is the target expression - the value we are trying to predict. It must be a measure.SUM([Profit]), SUM([Ad Spend]): These are your predictors - the factors you believe influence your sales. You can include as many as you think are relevant.
Step 3: Put Your Prediction to WorkOnce you save that calculated field, "Predicted Sales" will appear in your Data pane just like any other measure. Now you can use it!
A great way to see how well your model performed is to build a scatter plot. Drag your new Predicted Sales to the Columns shelf and your original Actual Sales (SUM([Sales])) to the Rows shelf. Each dot on the chart represents a period (like a month). If your prediction was perfect, all the dots would fall on a perfectly straight diagonal line. The closer the dots are to forming that line, the more accurate your model is.
This method gives you much more control and helps you uncover the drivers behind your business outcomes, taking you far beyond simple time-based forecasting.
Going Deeper: Integrating with Einstein Discovery
For organizations that need even more AI horsepower, Tableau can integrate with Einstein Discovery (part of the Salesforce platform). Think of this as bringing in a data scientist to analyze your data, build sophisticated models, and explain the findings to you in plain English - all automatically.
You would use Einstein a bit differently. Instead of you choosing the "predictors," Einstein sifts through all your data to find the key patterns and variables that most impact an outcome you care about, like increasing sales or reducing customer churn.
Key benefits of using Einstein with Tableau include:
Automated, Unbiased Insights: Einstein analyzes your dataset and generates a "story" that highlights statistically significant findings. It might tell you, "Your sales are 20% higher when deals are sourced from the 'Webinar' channel, especially in the EMEA region."
No-Code AI Model Building: You define a goal (e.g., "I want to maximize profit") and Einstein automatically tests different statistical models, chooses the best one, and deploys it without you having to write a single line of code.
What-If Scenarios: You can embed an Einstein model directly into a Tableau dashboard. A sales manager, for example, could open a dashboard, change variables on the fly - like increasing a shipping discount from 5% to 10% - and instantly see how that impacts the predicted shipping window or profit margin.
This integration is ideal for businesses that are looking to operationalize AI across their teams. It helps bridge the gap between complex data science and everyday business decisions, letting non-technical users harness the power of AI to understand what happened, why it happened, and what is most likely to happen next.
Final Thoughts
Tableau offers a clear pathway for getting started with predictive analytics, allowing you to graduate from simple forecasting to building complex, multi-factor models. Whether you're using the one-click forecast for a quick sanity check or tapping into modeling functions to understand key drivers, you now have the tools to look forward, not just back.
While Tableau is a fantastic tool for this kind of deep-dive visualization, a lot of the initial work still relies on having your different data sources in one place. That's a big part of why we built Graphed. We automate the connection to all your key marketing and sales platforms - like Shopify, Google Analytics, and Facebook Ads - and let you build reports or get forecasts just by asking questions. You can ask things like, "Forecast my Shopify revenue for the next 90 days," and get an answer in seconds, which is a great starting point before you dive deep into a tool like Tableau.