Everything About Different Ways To Use Dual Axis Charts in Tableau

Everything About Different Ways To Use Dual Axis Charts in Tableau

This article will introduce you to various ways to use Charts in Tableau. Dual Axis Charts in Tableau.

Ways To Use Dual Axes Charts in Tableau

Dual-axis charts in Tableau are named so because they have two independent axis layered on top of each other.More often than not, they display a combination of different mark types. Charts in Tableau.

For example, here you can create a visualization displaying a measure with bars on one axis and lines on the second. This is one of my favorite chart in Tableau because there’s the ability to add a new axis, and yet have individual control over the axes. This unlocks some additional flexibility that creates several practical applications that can be used to improve your analysis, user experience, and design.
This post will show you how to build a dual-axis chart in Tableau as well as three different ways to use them.

How to Build Tableau Dual-Axis Charts for their Traditional use

So, I’m going to be using the Sample – Superstore dataset provided by Tableau. Now, let’s begin by making a traditional dual-axis combination chart.
You might be familiar with it, but I’ll also be sharing a second approach that you may not know which might save you a click or two.
This first chart portrays sales by year as bars on one axis, and profit ratio by year as lines on the other; both measures shall also be broken down by the Category dimension.

  • To begin, let’s create one of the charts, so I’ll start with Sales by Year by Category.
chart-3 ways to use dual axes charts in tableau- Edureka


Next, let’s place the second measure which is the Profit Ratio on the Rows Shelf.
At this point, you have two individual bar charts on two rows. There are two ways in which you can convert these two separate bar charts into a dual-axis bar chart.

chart-3 ways to use dual axes charts in tableau- Edureka

First, and the way most people learn, is to right-click on the second measure pill on the Rows Shelf, and choose Dual Axis.

chart-3 ways to use dual axes charts in tableau- Edureka

The second and a slightly more efficient method is to hover over the axis of the second row.

  • While hovering, a small triangle, green in colour, will appear in the upper left-hand corner of the axis.
  • You can left-click on the triangle and drag it to the opposite axis of the left axis on the first row.
  • When you hover over the right side of the chart, you’ll see a dashed line where the axis is intended to show up once you release the left mouse key.
chart-3 ways to use dual axes charts in tableau- Edureka

Course Curriculum

Tableau Certification Training Course

Explore Curriculum

In both cases, you end up with a dual-axis bar chart.

chart-3 ways to use dual axes charts in tableau- Edureka

Traditionally this should work better with a dual-axis combination chart. So, that’s what we’re going to do.
Now, for a dual-axis combination chart, we need a combination of mark types. When you have more than one measure on the Rows Shelf and/or Columns Shelf, each measure ends up getting its own Marks Shelf. What this means is that you can edit the mark types for the measures independently of each other.

Here’s how the final view looks after I change the mark type of Profit Ratio from bar to line.

chart-3 ways to use dual axes charts in tableau- Edureka

Lines should strictly be used when there is a relationship between the data points over time or if they’re being connected by a continuous dimension / measure. Discrete fields are processed in a particular order on the Rows Shelf or Columns Shelf in Tableau.

So for this example, Sales and Profit Ratio are broken down by the Category dimension first, then the Year(Order Date) dimension second. That works, but what if we wanted to break the two measures down by first the Year(Order Date) and then Category? Here’s how it’d look:

chart-3 ways to use dual axes charts in tableau- Edureka

Moving on with this article on Ways To Use Dual Axis Charts in Tableau

Using a dual-axis chart to make your user part of the story

The following graph is a remake of the CNN Money Calculator from money.cnn.com.

chart-3 ways to use dual axes charts in tableau- Edureka


The given viz features a curve that shows how each household income ranks by percentile. This is a very common “descriptive” view that describes high-level statistics. The real value is obtained by using the second axis to display where the individual using the dashboard, ranks on that curve. This makes the user a part of the story and is a way more engaging user experience.

To achieve this effect, I used a parameter in Tableau, which comes in-buit, that would allow the end user to choose any of the household income options between $2,000 and $450,000. After making this selection, the circle moves to the appropriate place based on user selection. Also, the label would get updated with a caption telling the end user what percentile rank their household income is in.

TABLEAU CERTIFICATION TRAINING COURSE

Tableau Certification Training Course

——————————————————————-

MICROSOFT POWER BI CERTIFICATION TRAINING COURSE

Microsoft Power BI Certification Training Course

———————————————————————

ADVANCED MS EXCEL 2016 CERTIFICATION TRAINING

Advanced MS Excel 2016 Certification Training

——————————————————————–

MSBI CERTIFICATION TRAINING COURSE

MSBI Certification Training Course

———————————————————————

QLIKVIEW CERTIFICATION TRAINING

QlikView Certification Training

——————————————————————-

MICROSTRATEGY 10 CERTIFICATION TRAINING

MicroStrategy 10 Certification Training

——————————————————————

PENTAHO BI CERTIFICATION TRAINING

Pentaho BI Certification Training

——————————————————————————————————————

This is a dual-axis combination chart. The curve for the left axis uses the mark type of a line chart, and the circle is a second measure that only displays a circle for the end user’s selection on the right axis. The trick to getting just one circle to show up is this simple formula that computes whether the user’s parameter selection matches the household income value on the Y-axis.

chart-3 ways to use dual axes charts in tableau- Edureka

Once you have this calculation, you can build the curve on the left axis and put the measure for the circle on the right.

chart-3 ways to use dual axes charts in tableau- Edureka

To finalize this view, you can synchronize the axes by right-clicking the axis for Circle and select the Synchronize Axis option. This ensures the circle to line up perfectly with the line on the opposite axis. Lastly, hide the axis on the right by right-clicking on it and unchecking the option Show Header.

Moving on with this article on 3 Ways To Use Dual Axes Charts in Tableau

Using a dual-axis to improve the design of a line graph

Suppose you have a line graph showing sales by month trend.

chart-3 ways to use dual axes charts in tableau- Edureka

Now I’ll put the Sales measure on the right axis, synchronize both of these axes, and change the mark type for the second axis to Area.

chart-3 ways to use dual axes charts in tableau- Edureka

At this point we have a dual-axis combination chart with Sales by month as a line graph and as an area chart. To finalise the view, hide the right axis and reduce the opacity of the area to 10%.

chart-3 ways to use dual axes charts in tableau- Edureka

Course Curriculum

Tableau Certification Training Course

Weekday / Weekend BatchesSee Batch Details

You can only use the second axis for a single purpose at one time. But if you are not using it for one of the former two reasons produced above, this is a third application that can serve to enhance your traditional line graphs.

This brings us to the end of this article on Ways To Use Dual Axis Charts in Tableau.

If you wish to master Tableau, Edureka has a curated course on Tableau Training Course which covers various concepts of data visualization in-depth, including conditional formatting, scripting, linking charts, dashboard integration, Tableau integration with R, and more. It comes with 24*7 support to guide you throughout your learning period. New batches are starting soon.

Got a question for us? Please mention it in the comments section and we will get back to you at the earliest.

Upcoming Batches For Tableau Certification Training Course

Course NameDate
Tableau Certification Training CourseClass Starts on 1st July,2023SAT&SUN (Weekend Batch)View Details
Tableau Certification Training CourseClass Starts on 24th July,2023MON-FRI (Weekday Batch)View Details

Recommended blogs for you

no-image-1.png

Introduction to Pentaho Metadata Editor

Read Article

Tableau-Table-Calculations-300x175.jpg

How To Build Tables & Transform Data With Tableau

Read Article

tableau-developer-resume-300x175.jpg

How to Build an Impressive Tableau Developer Resume?

Read Article

————————————————————————————————————————————–

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.