Author avatar

Deepika Singh

Building Dual-Axis Combination Charts in Tableau

Deepika Singh

  • Dec 5, 2019
  • 3 Min read
  • 346 Views
  • Dec 5, 2019
  • 3 Min read
  • 346 Views
Data
Tableau

Introduction

In business intelligence and visualization, reports are often presented in a dual-axis format, in which two independent axes are layered on top of each other. Dual-axis charts are very useful when we want to compare or try to understand the relationship between two or more continuous variables in a limited space and in one view. As an example, if we want to see revenues and profits against a category, such as region, we can use a dual-axis chart.

In this guide, you will learn how to build a dual-axis chart in Tableau.

Data

The data to make a dual-axis chart should consist of two continuous measures against a categorical value. In this guide, we’ll be using data containing the population and ownership of dogs and cats broken down by state from the American Veterinary Medical Association. The goal is to visualize the two continuous measures, cat population and dog population, against the dimension location.

Steps

Dual-axis charts can be constructed in Tableau using the following steps:

  1. Pull the Location category onto the Columns shelf.

Output:

Imgur

  1. We’ll then drag the cat population variable into the Rows shelf.
  1. The next step is to drag and drop the second continuous measure into the Rows shelf, next to the cat population. In this example, we will consider the dog population the secondary measure. We now have created the dual axis, but with different scales. At this point, we need to synchronize the two axes, which can be done by right clicking on the dog population axis and selecting the option Synchronize Axis. By default, the Marks shelf is set to automatic, which is a circle in the given example.

Output:

Imgur

  1. On the Marks card, we’ll have the option to format the two measures separately. To do this, we will go to the Marks shelf and change the primary measure shape to a bar.

There are 3 ways to change the mark type.

a. By changing the mark type in the mark shelf and selecting shape as bar, circle etc. b. By right clicking on the measure field and selecting mark type as bar, circle, shapes, etc. c. By right clicking on the axis and selecting the mark type as bar, circle, shapes, etc.

  1. The colors for the mark type can be changed through the Color option in the marks card. With this, our dual-axis chart is complete.

Output:

Imgur

The chart above compares the cat population (represented by the bar chart), and the dog population (represented by the line chart).
The dual axes make the comparison much easier as the cat and dog populations are depicted in just one chart against the dimension of location. For example, it is easy to infer form the chart that the ratio of cats to dogs is higher in Florida than in Georgia, where there are more dogs than cats.

Conclusion

In this guide, you learned about building a dual-axis chart in Tableau. Such charts are extremely powerful and recommended for people who have good data interpretation and visualization skills. There are many other charts in Tableau for graphical representation that also use dual axes, such as donut charts, lollipop charts, and bar-in-bar Charts.

1