How to Make a Slope Chart in Tableau and When it’s Most Useful

Slope charts in Tableau emphasize the start and end date changes on the data, removing all the noises and the crazy ride in between. This leaves you only the most important data to focus on.

Why should you use a slope chart in Tableau?

Imagine we have the following chart: 

Why Use Slope Charts Tableau

How useful is this?  How much insight can we pull from this noise?  Very little.  With the data highlighter, that would help, but still we would have to go one at a time. 

What if we just wanted to compare a start point vs. an end result and eliminate the noise in between?  For this, we can use a Slope Chart.  Slope Charts look like this.  They show the starting point and the ending point, and they eliminate all the points in between.  They’re great for showing a before/after scenario, and can also reveal rankings, changes, and the magnitude of said change.

Slope Chart Tableau

Building a Slope Chart with a Continuous Axis 

  1. Start by bringing Profit to Rows and Order Date to Columns. 
How to Make Slope Chart in Tableau
  1. Click the drop down arrow on Order Date to Month (May 2015).  It’s in the second set of dates.  We’re making this date continuous, not discrete.  The pill should now be green. 
  1. Bring Order Date to the Filter shelf, and set it Range of Dates. 
  1. Click the down arrow on this filter and choose Show Filter. 
  1. Now, create a calculation called “First or Last.”  Do this by right clicking in Measures > Create Calculated Field, or by choosing the drop down arrow from the top of the data pane near Dimensions. 
  1. Write the following formula: FIRST() = 0 or LAST() = 0.  Choose Ok. 
  1. Drop this on Size.  You’ll see that the ends of the line get larger, while there isn’t much change in the middle. 
  1. A size legend will appear.  Right click on false and then choose Hide. 
  1. Drop Product Sub-Category onto the Labels shelf.  Your view should now look like this: 
How to Highlight Slope Chart Tableau
  1. Click the Color shelf icon and under Effects > Markers, set it to the second icon with the dots.  This will create a circle for each end of the line. 
  1. Hold down the Ctrl key and drag a second instance of Profit to the right on the Rows shelf. 
  1. Click the down arrow on that second Profit pill and choose Dual Axis. 
  1. Right click on that second axis and then choose Synchronize Axis. 
  1. Set the date field by typing in 10/1/2009 and 10/31/2012 in the Order Date filter at the top right.  Your view should now look like this: 
Slope Chart in Tableau
  1. Click the down arrow on the Product Sub-Category pill and turn on the Data Highlighter.  You can now highlight a particular element and see changes.   
  1. On the first, Sum(Profit) Shelf on the left, click the Label icon, and turn off “Show Mark Labels.” 
  1. On the second one, click Label and ensure Show Mark Labels is checked.  Down below that, set Marks to Label to Line Ends.  Beneath that, uncheck the box that says “Allow labels to overlap other marks.” We can immediately see that Office Machines have become much more profitable for us, while Copiers and Faxes have dropped dramatically and are now losing money. 

With the data highlighter in use, we can zero in on any product line, like this: 

Tableau Slope Chart Highlight

Quick Tips:

If I wanted to see an end result vs. a starting point and eliminate distracting data, the best charts to use are Slope Charts in Tableau.

Why?

Slope charts eliminate noise from a time series or trend and show you just where you started and where you finished.  It’s helpful if you just want to see if you made progress, or where you ended up. 

Now that you know when to use a Slope Chart in Tableau and how to use it when needed, be sure to check out our Advanced Tableau classes, available for individuals and corporate teams.