askvity

How to Overlap Visualizations in Tableau

Published in Tableau Visualization 6 mins read

Overlapping in Tableau visualizations typically refers to displaying multiple sets of marks (like bars, lines, circles) or multiple measure axes within a single chart view. This technique is used to compare data points, show relationships between different measures, or add context to your primary visualization, allowing for richer insights without needing separate charts.

Core Techniques for Overlapping in Tableau

Tableau offers several ways to create visualizations with overlapping or layered elements. The primary methods involve manipulating how measures are placed on the Rows and Columns shelves and utilizing the dual-axis feature.

Using Dual Axes (Layering Different Measure Scales)

A common way to overlap visualizations is by using a Dual Axis. This is particularly useful when you want to display two measures that might have different scales or units on the same chart, sharing a common dimension axis (like Date or Category).

  • How it works: You place one measure on the Rows or Columns shelf, and then place a second measure on the opposite shelf or drag it specifically to the right side of the view area to create a second axis. Tableau then draws marks for both measures on the same chart area.

  • Typical use cases: Displaying a line chart over a bar chart (e.g., sales vs. profit margin over time), showing quantities and monetary values together, or comparing actuals with a target line on a different scale.

  • Steps:

    1. Place your dimension on the Columns shelf (often making it discrete).
    2. Place your first measure on the Rows shelf.
    3. Place your second measure on the Rows shelf.
    4. Right-click the second measure pill on the Rows shelf and select "Dual Axis".
    5. Right-click the secondary measure axis in the view and select "Synchronize Axis" if the scales are related and you want them aligned.
  • Reference Connection: The provided video snippet demonstrates this by mentioning placing 'inventory' "on the second axis". This explicitly refers to using the Dual Axis feature to overlay the Inventory measure, likely as a line, onto a chart showing sales data.

Blending Axes (Layering Measures with Similar Scales)

You can also overlap measures that have similar scales by placing them on the same axis. This is often done automatically by Tableau or by using the Measure Names and Measure Values fields.

  • How it works: You place multiple measures on the Rows or Columns shelf, and Tableau combines them onto a single axis. You can then use Measure Names on the Color or Column shelf to differentiate the marks (e.g., showing Sales and Budget Sales side-by-side or slightly overlaid as bars).

  • Typical use cases: Comparing actual vs. budget figures, displaying multiple key performance indicators (KPIs) on the same scale.

  • Steps:

    1. Place your dimension on the Columns shelf.
    2. Place your first measure on the Rows shelf.
    3. Drag your second measure and drop it directly onto the axis of the first measure. Tableau will blend them onto a single axis, often using Measure Names and Measure Values.
    4. Alternatively, place multiple measures on the Rows shelf, and Tableau may automatically blend them or show separate axes. You can then drag Measure Names to Color or the Column shelf to control the display (e.g., side-by-side bars).
  • Reference Connection: The video mentions taking 'sales' on the rows and 'budget sales' "on both sales on the axis". This likely refers to adding Budget Sales to the same axis as Sales, possibly using the blending method to create overlapping or side-by-side bars representing these two measures.

Example: Creating Overlapping Bars and a Line (Based on Reference)

Combining the techniques mentioned in the reference allows you to create a compound visualization like overlapping bars and a line chart. Based on the video snippet's description:

"And we are going to make it discrete. We are going also to take sales on the rows. And we will take budget sales on both sales on the axis. Also on the second axis we are going to take inventory."

Here's how you would interpret and apply these steps in Tableau:

  1. Set up the Dimension: Take a dimension (like 'Order Date' truncated to month) and place it on the Columns shelf. Right-click the dimension pill and ensure it is discrete (e.g., Month(Order Date) shown as blue pill).
  2. Add Primary Measure (Sales): Take the 'Sales' measure and place it on the Rows shelf. This creates the first measure axis.
  3. Add Secondary Measure (Budget Sales) to Primary Axis: Take the 'Budget Sales' measure and drag it onto the Rows shelf next to 'Sales'. Alternatively, if you want overlapping bars or specific side-by-side comparison on the same axis, you might use Measure Names on the Columns shelf and Measure Values on the Rows shelf, then filter Measure Names to include only Sales and Budget Sales. The phrase "on both sales on the axis" strongly suggests combining these two onto the same axis.
  4. Add Tertiary Measure (Inventory) as Dual Axis: Take the 'Inventory' measure and place it on the Rows shelf next to the other measure(s). Right-click the 'Inventory' pill on the Rows shelf and select Dual Axis.

This process results in a chart where a discrete dimension (like month) runs along the bottom, bars for Sales and Budget Sales are shown on one vertical axis, and a line for Inventory is shown on a second vertical axis overlaid on the same pane. You would then typically adjust the Mark types for each measure (e.g., Bars for Sales/Budget Sales, Line for Inventory) using the Marks card.

Why Overlap Visualizations?

  • Comparison: Easily compare multiple measures or different categories of data on the same view.
  • Context: Add relevant data points (like targets, forecasts, or related metrics) to the main visualization for better context.
  • Space Efficiency: Present more information in a single chart area.

By using dual axes, blending axes, and customizing mark types, you can create powerful and informative overlapping visualizations in Tableau.

Related Articles