How to Show Correlation in Tableau

Cody Schneider9 min read

Seeing how two different numbers move together is one of the most fundamental tasks in data analysis. When your ad spending goes up, do sales also go up? As discounts increase, does profit go down? Answering these questions is all about finding correlation, and Tableau makes it incredibly simple to turn dull spreadsheet columns into a clear, visual story. This guide will walk you through creating scatter plots to show correlation in Tableau, adding trend lines for statistical proof, and interpreting what you see.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What Is Correlation? (And Why Should You Care?)

Before jumping into Tableau, let's quickly review what correlation actually means. In simple terms, correlation is a statistical measure that expresses the extent to which two variables are linearly related, meaning they change together at a constant rate.

There are three main types you'll encounter:

  • Positive Correlation: When one variable increases, the other variable also tends to increase. Think about ice cream sales and temperature - as it gets hotter, sales go up.
  • Negative Correlation: When one variable increases, the other variable tends to decrease. For example, as the number of hours you spend driving increases, the amount of fuel in your tank decreases.
  • No Correlation: There is no apparent relationship between the two variables. For example, your monthly coffee consumption likely has no relationship with the stock price of a tech company.

Visualizing these relationships is far more powerful than just looking at numbers. It helps you quickly spot trends, identify outliers, and form hypotheses about your business. A dashboard showing a strong positive correlation between Facebook Ad spend and Shopify sales gives you confidence to increase your ad budget. A negative correlation between customer satisfaction scores and wait times gives you a clear problem to solve.

The Best Chart for Seeing Correlation: The Scatter Plot

While there are other ways to show relationships, the scatter plot is the gold standard for correlation analysis. It's designed for exactly this purpose: comparing two different numerical values to see if there's a pattern.

Each dot on a scatter plot represents a single data point where the two variables intersect. For example, each dot could represent a specific day, with its position on the horizontal X-axis showing ad spend and a vertical Y-axis showing sales for that day. After you plot all your data points, a pattern usually emerges, telling you the story of how your two variables interact.

Your Step-by-Step Guide to Creating a Scatter Plot in Tableau

Let's build a scatter plot from scratch. For this example, we’ll use Tableau's sample "Superstore" dataset, which everyone has. Our goal is to see if there's a correlation between Sales and Profit for individual products.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 1: Connect to Your Data

First, open Tableau and connect to the "Sample - Superstore" data source, which you can find under Saved Data Sources on the startup screen.

Step 2: Add Your First Measure to Columns

Measures are your quantitative, numerical data fields (like sales, profit, quantity). Dimensions are your qualitative, descriptive data (like category, region, customer name).

Since scatter plots compare two measures, let's start by dragging the Sales measure onto the Columns shelf. This will create a horizontal axis for your sales data.

Step 3: Add Your Second Measure to Rows

Next, find the Profit measure in the data pane and drag it onto the Rows shelf. This will create a vertical axis for your profit data.

Step 4: Understand the Single Point

At this point, you'll see something that doesn't look like a scatter plot at all - just a single mark on the chart. Don't worry, this is normal! This happens because Tableau's default behavior is to aggregate your measures. Right now, that single dot represents the sum of all sales and the sum of all profit in your entire dataset.

To see the relationship between individual sales and profits, we need to break this single point down into many individual points. You have two primary ways of doing this.

Step 5: Disaggregate Your Data

For a true scatter plot, you need to see a mark for every single row in your dataset. The easiest way to get there is to disaggregate the measures.

Go up to the Analysis menu at the top of the Tableau window. In the dropdown, find Aggregate Measures - you'll see it has a checkmark next to it. Click it to uncheck it.

Instantly, your chart will transform into a proper scatter plot, with thousands of individual marks. Each mark now represents a single sale from your data, plotted according to its specific 'Sales' value and 'Profit' value. Already, you can start to see a general pattern: as sales increase, profit tends to increase as well, indicating a positive correlation.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 6: Add Dimensions for Deeper Context

A basic scatter plot is good, but a great scatter plot often uses dimensions to add more context. This lets you see if the correlation holds true across different segments of your business.

Let's see if the sales-profit relationship changes by product Category. Find 'Category' in the Dimensions pane and drag it onto the Color tile in the Marks card. Tableau will now color-code each point based on whether it's from 'Furniture', 'Office Supplies', or 'Technology'.

This reveals a powerful new insight. The 'Technology' and 'Office Supplies' points mostly follow the positive correlation, but the orange 'Furniture' points are all over the place, with many showing a loss (negative profit) even with high sales. You just used a scatter plot to identify a problem area in your business!

Going Deeper: Trend Lines and Statistical Analysis

Visual patterns are great, but sometimes you need real numbers to back them up. Tableau's built-in analytics features make it easy to add a trend line and statistical measures directly to your scatter plot.

How to Add a Trend Line

With an empty space on your chart still showing, right-click and choose Trend Lines > Show Trend Lines. Alternatively, you can click the Analytics pane (next to the Data pane) and drag the 'Trend Line' model onto the 'Linear' option in the view that appears.

Tableau will draw a line of best fit through your data points. The direction of this line immediately confirms your visual analysis:

  • Upward sloping line: Positive correlation
  • Downward sloping line: Negative correlation
  • Flat (or nearly flat) line: No significant correlation

Since we added 'Category' to color, Tableau automatically creates a separate trend line for each category, further highlighting that the profit-to-sales relationship is different for furniture than it is for technology.

How to Interpret R-Squared and P-Values

A trend line is more than just a visual aid, it comes with important statistical information. Simply hover your mouse over any part of the trend line, and a tooltip box will appear with a few key metrics.

The two most important are:

  1. R-Squared (R²): This value tells you how much of the variation in your Y-axis variable (Profit) can be explained by your X-axis variable (Sales). The value is always between 0 and 1. A higher R-Squared means a better fit. As an example, an R-Squared of 0.65 means that 65% of the change in profit is determined by the change in sales. If you have an R-Squared of 0.1, it means there's a very weak relationship.
  2. P-value: This value tells you the statistical significance of your findings. A simple rule of thumb for most business analysis is: if your P-value is less than 0.05, you can be confident that the correlation you are observing is not just due to random chance. It's a "real" relationship. If it’s high (e.g., >0.05), you should be skeptical of the trend line, even if it looks promising.

In our Superstore example, you'll find that all our categories have P-values that are effectively zero (p < 0.0001), meaning the correlations are statistically significant. However, the R-squared values tell a more nuanced story about the strength of that relationship across categories.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Alternative View: A Heatmap for Multiple Correlations

A scatter plot is perfect for a deep dive into two variables. But what if you want to see the correlation between many different pairs of variables at once? A correlation matrix, often visualized as a heatmap, is the right tool for that job.

The setup for this is a little more advanced and often involves creating calculated fields using Tableau's correlation function, CORR(). For example, to find the correlation coefficient between Sales and Profit, you would create a calculated field with the formula:

CORR([Sales], [Profit]) 

You can then build a grid with your measure names on both the columns and rows, and place this calculated field on the color shelf. This creates a matrix where the intersection of each row and column shows a color-coded square that represents the strength and direction of the correlation - deep red for strong negative, deep blue for strong positive. This gives you a bird's-eye view, helping you spot which pairs of variables are most interesting and deserving of a deeper investigation with a scatter plot.

Final Thoughts

Mastering the scatter plot in Tableau is a fundamental skill that unlocks a deeper understanding of your data. It moves you from simply looking at totals and averages to analyzing the dynamic relationships that drive your business. By adding trend lines and thinking about the context provided by dimensions, you can quickly find and validate important business insights.

While building these charts one by one in tools like Tableau is essential for deep analysis, it isn't always the fastest way to get answers - especially when your data lives across platforms like Google Analytics, Shopify, and Salesforce. Here at Graphed, we created a tool that automates this entire process. You can simply connect your accounts and ask, "show me a comparison of Facebook Ads spend versus Shopify revenue by campaign for last month," and get a live, interactive dashboard in seconds. Instead of spending hours manually joining data sources and configuring charts, you get immediate answers, letting you focus on the insights, not just the setup.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!