How to Add Secondary Axis in Tableau

Cody Schneider10 min read

Creating a chart with sales and profit margin side-by-side isn't always helpful, especially when sales are in the millions and the profit margin is a percentage. A dual-axis chart solves this problem by giving each measure its own y-axis on a single, unified visualization. This article provides a step-by-step guide on how to create a dual-axis chart in Tableau and explains why it's one of the most useful tools for data analysis.

What is a Dual-Axis Chart?

A dual-axis chart, sometimes called a secondary axis chart or a combination chart, is a visualization that displays two different measures against the same dimension. It features two independent y-axes - one on the left and a second on the right - with a shared x-axis, which is typically a time period or categorical dimension.

This layout is incredibly useful when you need to compare two measures that have completely different scales or units. For instance, you might want to see how website sessions (measured in thousands or millions) correlate with the conversion rate (measured as a percentage) over the last year. Putting both on a single axis would flatten the conversion rate line, making its trend invisible. By giving each measure its own axis, you can clearly see the patterns and relationships of both on the same graph.

In essence, you are overlaying two different charts to tell a more complete story in a single, efficient view.

When to Use a Secondary Axis in Tableau

Dual-axis charts aren't just for fancy dashboards, they solve specific analytical problems. Knowing when to use one can elevate your reports from simple data dumps to powerful decision-making tools.

To Compare Measures with Different Scales

This is the primary and most common reason to build a dual-axis chart. You have two important metrics you want to analyze together, but their magnitudes are worlds apart. Without a secondary axis, you can't effectively visualize them on the same chart.

Examples include:

  • Sales Revenue vs. Quantity Sold: Comparing total revenue in dollars (e.g., $1.5M) with the number of units sold (e.g., 2,000 units).
  • Website Traffic vs. Conversion Rate: Tracking visitor sessions (hundreds of thousands) against the goal conversion rate (e.g., 2.5%).
  • Stock Price vs. Trading Volume: Plotting a company's stock price over time alongside the daily trading volume.

To Show Relationships Between Measures

Dual-axis charts are excellent for spotting correlations and trends between different parts of your business. By plotting two related metrics over the same time period, you can quickly identify potential cause-and-effect relationships.

For example, if you run a promotion, you might chart Average Discount (%) alongside Units Sold. A dual-axis chart would clearly show if spikes in discounts preceded spikes in sales. Similarly, mapping Marketing Spend against New Customer Acquisitions helps you visualize the immediate impact of your advertising budget.

To Combine Multiple Mark Types

One of the most powerful features of Tableau's dual-axis functionality is the ability to use different "marks" or chart types for each measure. This turns a simple chart into a rich, informative visual story.

A classic example is combining a bar chart with a line chart. You can represent total sales each month with bars, providing a clear sense of volume, while overlaying a line to show the profit margin percentage. This combination instantly communicates both the magnitude of sales and its associated profitability in one easily digestible graph.

How to Add a Secondary Axis in Tableau: A Step-by-Step Guide

Let’s walk through a practical example of building a dual-axis chart from scratch. Our goal is to analyze monthly Sales (in dollars) and the Quantity of items sold over a two-year period using Tableau's Sample - Superstore dataset.

Step 1: Create Your Initial Chart

First, we need to create a basic line chart for our primary measure. This will serve as the foundation for our dual-axis view.

  1. Open Tableau and connect to the Sample - Superstore data source.
  2. Drag the Order Date dimension from the Data pane onto the Columns shelf. By default, Tableau will likely show it as YEAR(Order Date).
  3. Right-click the YEAR(Order Date) pill in the Columns shelf and select Month (the second month option, MONTH(Order Date) below year, quarter). This will give us a continuous monthly view.
  4. Next, drag the Sales measure onto the Rows shelf.

At this point, you'll have a simple line chart that displays the total sales for each month across the entire dataset. It's a useful starting point, but it only tells half the story.

Step 2: Add the Second Measure

Now, let's add our second measure, Quantity, to the view. This won't create the dual-axis chart just yet, but it's the critical next step.

  1. Find the Quantity measure in the Data pane.
  2. Drag Quantity and drop it onto the Rows shelf, to the right of the existing SUM(Sales) pill.

Tableau will now display two separate line charts stacked on top of each other. The top chart shows SUM(Sales) over time, and the bottom one shows SUM(Quantity) over time. Each has its own independent row and its own Y-axis (both on the left). We're getting closer, but now we need to merge them.

Step 3: Create the Dual Axis

This is where the magic happens. We'll tell Tableau to combine these two charts into one view by creating a secondary axis for our second measure. There are a couple of ways to do this.

Method 1: The Right-Click Method (Easiest)

  1. In the Rows shelf, right-click the second measure pill, which is SUM(Quantity).
  2. Select Dual Axis from the context menu that appears.

Method 2: The Drag-and-Drop Method

  1. Hover your cursor over the Y-axis of the bottom chart (the one for Quantity) until you see the move cursor (a grid of arrows).
  2. Click and drag that axis over to the right side of the view until you see a dashed orange line appear along the right edge.
  3. Release the mouse button.

Both methods achieve the same result. The two line charts will merge into a single chart area. SUM(Sales) will keep its axis on the left, and SUM(Quantity) will now have a new axis on the right. You have successfully created a dual-axis chart!

Step 4: Synchronize Axes (Optional but Important to Understand)

Sometimes, your two measures might be in the same units (e.g., comparing Sales vs. Profit in dollars) and you want them to share a common scale. In this case, you should synchronize the axes.

To synchronize, simply right-click the right-side axis (the secondary axis) and select "Synchronize Axis."

However, be very careful with this feature. For our example of Sales ($ thousands) versus Quantity (thousands of units), synchronizing would be a mistake. The scales are fundamentally different, and forcing them to match would render one of the lines nearly flat and unreadable. You should only synchronize when the measures are directly comparable and of the same unit and approximate scale.

Advanced Tips and Tricks for Dual-Axis Charts

With the basics covered, let’s explore how to customize your visualization to make it more insightful and professional.

Combining Different Mark Types

This is where dual-axis charts really shine. Let's change our Sales measure to display as a bar chart while keeping Quantity as a line. This combination is great for visualizing a volume metric alongside a trend.

  1. Look at your Marks card. You'll see it now has three sections: All, SUM(Sales), and SUM(Quantity). This allows you to control the formatting for each measure individually.
  2. Click on the SUM(Sales) Marks card.
  3. In the dropdown menu that currently says Automatic, select Bar.
  4. Next, click on the SUM(Quantity) Marks Card and select Line from the dropdown menu, if not already configured.

Presto! Your chart now shows monthly sales as clear, distinct bars, with a line representing the number of units sold gracefully laid over the top. It provides a much richer view of the business dynamics.

Adjusting Colors and Formatting

Clarity is everything. Don't let your audience struggle to remember which line is which. Use color effectively to distinguish the two measures.

  • On each measure's Marks card (e.g., SUM(Sales)), click the Color tile. You can choose a different color palette or a specific color for the bars and the line.
  • Consider reducing the opacity of the bars or making the line a bright, contrasting color so it stands out. For instance, you could use a light gray for the sales bars and a bright orange for the quantity line.
  • Tip: Always remember to include a color legend or ensure your axis titles are extremely clear so users know what each color represents.

Cleaning Up Your Chart: Titles and Labels

A great chart can fall flat without clear labeling. Take a moment to clean up your axes and add titles.

  • Right-click on the left axis (for Sales) and select Edit Axis. Change the Title from "Sales" to something more descriptive like "Total Sales (USD)".
  • Do the same for the right axis, changing "Quantity" to "Units Sold".
  • To add data labels, go to the Marks card for the measure you want to label (e.g., SUM(Quantity)), click on the Label tile, and check Show Mark Labels. You can then adjust the font, size, and alignment as needed. Be careful not to overcrowd your chart with labels.

Common Mistakes to Avoid

Dual-axis charts are powerful, but they can be misleading if used incorrectly. Here are a few common pitfalls to steer clear of.

  • Comparing Unrelated Measures: Just because you can plot two metrics on a chart doesn't mean you should. A dual-axis chart implies a relationship exists. Displaying two completely unrelated variables - like website visits and office temperature - can create connections in the viewer's mind that simply do not exist.
  • Confusing Axes: If your axes are not clearly labeled, your chart is worthless. Ensure both the left and right axes have descriptive titles that include the units (e.g., %, $, units). Use different colors for each measure and include a legend.
  • Using the Same Mark Type with Similar Patterns: Having two-line charts on a dual axis can sometimes look like a jumble of spaghetti, especially if they have similar trends. This is a good opportunity to use a different mark type (line and bar) to make the dual storylines more distinct.
  • Not Setting a Zero Baseline Properly: Be mindful of your axis ranges. Visually, a slight dip can look catastrophic if your axis starts close to your data's minimum value rather than a true or logical zero. While Tableau is good at this automatically, always double check when building visuals for important stakeholder meetings.

Final Thoughts

Mastering the dual-axis chart in Tableau is a valuable skill for any data analyst. It's a versatile tool that allows you to compare different measures, uncover hidden relationships, and combine chart types to tell a richer, more contextual data story.

That said, we know that spending hours in tools like Tableau clicking buttons, dragging pills, and formatting axes is a time-consuming process. We built Graphed to simplify this entire workflow. Instead of going through multiple steps, you can just ask in plain English, "create a combination chart of monthly sales and quantity sold," and our AI data analyst will build and configure the interactive dashboard for you instantly, using live data from your connected sources.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.