top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

Dual-Axis Chart in Tableau


What is a dual-axis chart?

A dual-axis chart is a chart representing two sets of data overlaid on top of one another, in which the resulting charts will have a shared axis. For example, you might have an X-axis for date (months) values, and two separate Y-axis representing separate measures, sales, and profit, on each side of your chart. This allows you to compare profit and sales figures over a period. In dual-axis, you can format your chart with separate marks card for each axis. In our example, we are representing sales figures using a bar chart while using an area chart for profit.



How to create your dual-axis chart in Tableau

The first step in creating dual-axis charts is to make a graph for one of your measures.

You then drag your second measure onto your row shelf. Tableau will generate a second graph which is technically a dual-axis chart at this point. But not a dual-axis combination chart.

Note: You can add up to four layered axis: two on the Columns shelf and two on the Rows shelf.


Create a dual-axis combination chart by changing one of the mark types.

When the second measure was dropped onto the view, not only did the field appear on the rows shelf, but a new marks shelf was generated. The marks for each measure can now be edited independently of each other, allowing you to display a combination of mark types on your view.

Let’s change the mark type of the Sales field to Bar and leave the mark type for Profit as line.

This is accomplished by clicking on the Marks Shelf for SUM(Sales) and changing the mark type from Automatic to Bar.

At this point, the view looks like this:




Now, you have to combine two graphs for that you have to click on the SUM(Profit) measure and select dual axis.

At this point, the view looks like this:



Synchronizing axis

You will need to decide whether or not the two axis should be synchronized. If the unit of measure is the same for both measures, right-click on the right axis and select Synchronize Axis. This aligns the scale of the secondary axis to the scale of the first axis.

In our example, the Profit axis is the secondary axis and the Sales axis is the primary axis.


Note: You can synchronize dual axis for numeric data types that don’t match. For example, you can synchronize an axis that uses an integer data type and an axis that uses decimal data type.


Formatting your chart

Before we add this chart to our dashboard, let’s take a few more formatting steps to polish these views. First, change the mark type of the Profit field to Area. This is accomplished by clicking on the Marks Shelf for SUM(Profit) and changing the mark type from Line to Area.



Next, change the colors of Sales (BAR) and profit(AREA) as per your liking. I decided to make the Sales as Pink and Profit as Light Teal. This is accomplished by clicking on the Marks Shelf (All)> colors>edit colors.



Next, add a label to the Sales by dragging sales measure into Label of Marks Sum(Sales) and Profit measure into Label of Marks Sum(Profit).You can shrink the size of the Bars in Sum(Sales) Marks and change format of Labels as per your liking.



Dual-Axis Combination Chart


53 views0 comments

Recent Posts

See All

In Salesforce, an "org" is a term used to describe a single instance of the platform that is customized and configured to meet the specific needs of a business. Each org is unique and contains its own

bottom of page