Visualize and understand data with Tableau: Scatter Plot, Trend Line, and Advanced Analytics

Today, I want to discuss a topic that may seem technical. Still, I will explain Scatter Plots (scatter diagrams), Trend Lines, and other Custom Analytics features with Tableau. The features are essential for effectively visualizing, understanding, and communicating patterns in data. Let's see what it's all about.

1

The Scatter Plot is a fundamental tool for representing the relationship between two numerical variables. For example, we can represent sales on the X-axis and profit on the Y-axis, thus visualizing the behaviour of the two variables with over 10,000 data points from the Superstore dataset provided on Tableau for educational purposes.

Scatter Plot

Usually, Tableau aggregates these data, showing a single point representing the sum of all sales and profits. To visualize each observation instead, we can deselect the "Aggregate Measures" option from the "Analysis" menu or add the Row ID as a detail to disaggregate the chart. If this field ("Row ID") is not visible in the "Data" sidebar, enable the "Show Hidden Fields" option and click on the "Unhide" icon.

To visualize each observation, we can deselect the “Aggregate Measures” option from the “Analysis” menu.
Add the Row ID as a detail to disaggregate the chart. If this field (“Row ID”) is not visible in the “Data” sidebar, enable the “Show Hidden Fields” option and click on the “Unhide” icon.

The chart showing the relationship between sales and profits can be a great example of using a scatter plot to highlight patterns in data.

Case study: Sales and Profit Analysis

Imagine being the sales manager of a chain of stores, each located in a different city. We want to understand if an increase in sales automatically leads to a rise in profits or if there are anomalies. By creating a scatter plot with sales on the X-axis and earnings on the Y-axis, we can identify which cities these stores are above or below the trend line. For example, we might discover that some stores with high sales record low profits due to high costs. To verify if there is a correlation between sales and profit, we use a linear Trend Line directly from the Analytics tab. In this specific case, the R² is 0.6, meaning 60% of the variability in profit can be explained by sales, representing a moderate correlation.

To verify if there is a correlation between sales and profit, we use a linear Trend Line directly from the Analytics tab. In this specific case, the R² is 0.6, meaning 60% of the variability in profit can be explained by sales, representing a moderate correlation.

As we have just seen, Trend Lines are very useful and have multiple applications, such as if you work for a company that sells different types of products and want to optimize your marketing strategy. By using Trend Lines on a scatter plot that represents profit versus marketing expenses, you can see if there is a positive correlation between increased advertising expenses and increased profit. If you notice a weak correlation (low R²), it might mean that your advertising campaigns are ineffective and need to be reviewed.

2

Another interesting feature of Tableau is the Reference Band (reference bands). Imagine wanting to highlight only the products with below-average sales but above-average profits in our sales/profit chart. We can add specific reference bands for sales and profits to do this.

Reference Bands

This chart highlights the areas below the average sales and above the average profits.

This chart highlights the areas below the average sales and above the average profits.

The two sub-categories, "Machines" and "Tables," have above-average sales but below-average profit, which is not ideal.

The two sub-categories, “Machines” and “Tables,” have above-average sales but below-average profit, which is not ideal.

"Paper" is below average in sales, but with above-average profit.

“Paper” is below average in sales, but with above-average profit.

If we want to compare at the category level, we must drag this dimension into "Color".
We can see that "Technology" is quite profitable, while the profit results for "Furniture" are somewhat disappointing, if not problematic.

tableau,scatter plot,trend line
tableau,scatter plot,trend line

Adding a Reference Band helps better understand where the opportunities lie, especially in sectors like marketing, where analyzing product behaviour is crucial. For e-commerce online stores that sell hundreds of products and want to understand which ones to promote more during an advertising campaign, using a scatter plot helps to identify those with the most significant growth potential.

3

To provide an even more comprehensive view of the analysis, we can create a time series plot to analyze/monitor the profit/performance of a company over time. Suppose the company aims to achieve a profit of 2000 dollars per month. With Tableau, it is possible to add a reference line to highlight this goal and quickly visualize the months it was not reached. We notice that in some months, the profit is below the goal: this may suggest further analysis of these months to understand what went wrong and how to improve it.

With Tableau, a reference line can be added to highlight this goal and quickly visualize the months it was not reached. We notice that in some months, the profit is below the goal. This may suggest further analysis of these months to understand what went wrong and how to improve in the future.

We can also easily highlight critical areas by comparing them with the annual average–in this example, the average increases yearly, indicating an extremely positive trend.

We can also easily highlight critical areas by comparing them with the annual average—in this example, the average increases yearly, indicating an extremely positive trend.
4

Tableau offers distribution bands to visualize how the data is distributed relative to tertiles. These bands can highlight the 25th and 75th percentiles of the profit of various product sub-categories, clearly showing which products perform better.

These bands can highlight, for example, the 25th and 75th percentile of the profit of various product sub-categories, clearly showing which products perform better.
Distribution Bands - quantiles
Tableau offers distribution bands to visualize how the data is distributed relative to specific percentiles.
Tableau offers distribution bands to visualize how the data is distributed relative to specific percentiles.

So, using a box plot and distribution bands, we can show how to divide the data into quartiles and quickly identify outliers. Imagine you have a company that sells different types of products and wants to evaluate the performance of the other categories. Creating a box plot with the distribution bands shows which categories are below average (first quartile) and among the best (third quartile). This analysis can help you decide strategically which categories to enhance or review.

We can show how it is possible to divide data into quartiles and quickly identify outliers through box plots and distribution bands.

Using Scatter Plots, Trend Lines, and other advanced analysis features in Tableau allows us to transform raw data into valuable information. These tools help us understand the relationships between variables better, identify trends, and visualize business targets intuitively. Tableau is powerful software, and using these tools can improve the quality of our analyses and help us make more informed decisions.

Note: The dashboard is available for download on my page on Tableau Public.

This content is blocked because it would connect to YouTube.
Michele Bedin

Michele Bedin

WordPress technical consultant for SMEs. Over 25 years of experience in web development, accessibility, SEO and data analytics.

Follow me on

Stay updated or let us talk

Subscribe to the newsletter for practical guides on WordPress, security and accessibility, or tell me about your project.

Scroll to Top