Tableau charts: Dual axis chart
In the series, Tableau charts, we strive to help Tableau users learn different techniques of presenting data, hence building a great resource to tackle different data sets available in different formats and variety. Therefore, in today’s article, we’ll explore on how to build a dual axis chart in Tableau.
But first, what is a dual axis chart? It is one of great way to illustrate relationships between two variables. We’ll be using data set on Main type of roofing in Kenya to compare use of ‘Asbestos sheets’ and ‘Corrugated iron sheets’ for different County’s. We will be creating dual axis chart using a line chart and a bar chart.
Related: How to create a divergent bar chart.
Related: How to create a bar in bar chart.
Connect data on main type of roofing to Tableau app and follow the guideline below.
Step 1: Build a simple bar chart using measure field ‘Asbestos sheets’.
Drag dimension ‘County' to the columns shelf.
Drag measure field ‘Asbestos sheets' to the rows shelf.
Step 2: Build a second bar chart using measure field ‘Corrugated iron sheets’.
Drag measure field ‘Corrugated iron sheets’ to the rows shelf next to the field ‘Asbestos sheets’.
See resulting chart.
Step 3: Make the charts dual.
There are two ways to achieve this;
Select the drop arrow of the field SUM(Corrugated iron sheets) in the rows shelf and choose ‘Dual Axis’.
Right click on the axis of the second chart ‘Corrugated iron sheets’ for this case, and select ‘Dual Axis’.
Note; Executing this step may change your chart from a bar to a circle, like in my case.
Step 4: Lets synchronize the axis.
Right click on any of the two axes and select ‘Synchronize Axis’.
Step 5: Change our charts to Line and bar chart respectively.
Under marks card, make the First chart a bar chart and the second chart a Line chart.
Executing above and removing one of the axis we’ve;
Tableau tip: How to select Top & Bottom N members using sets.
From this chart, we can compare use of ‘Corrugated iron sheets’ and that of ‘Asbestos sheets’ across all the County’s. As Per this data, ‘Corrugated iron sheets’ is used more than ‘Asbestos sheets’ in all the County’s.
Based on this data, dual axis chart is not the best chart to visualize the data since the variation between the two variables is huge, however it helps us learn how a dual axis chart is created.
I hope this article creates a great resource for your next dashboard.