Select Page

We’ve all seen those “before and after” pictures on the internet. They are super popular and there’s a good reason for that.

People love seeing transformation over a certain period of time.

When you are working with data, showing transformation over time is done all the time. It’s such a powerful way to tell a story with your data.

As part of the Makeover Monday weekly social data project, I came across the table below showing 2017-2018 Premier League predictions and the actual outcomes, created by the fine fine folks at The Guardian

So the underlying data here is a great example of “before” (predictions) and “after” (reality).

But the visualization is pretty boring (basically an Excel looking table with some team icons) and doesn’t really tell me anything interesting.

Here’s what I mean

  • The data table is very busy. The team icons are pretty distracting from the overall point of the visualization.
  • You have to hunt around to find the team you are interested in each column. My eyes are getting a real workout here!
  • I kinda want to know how well The Guardian was at predicting the outcome overall. There’s no summary here…just a list of teams.

You get the point. This Excel looking table can be visualized to give more context and to make it more interesting to the intended audience.

Here’s how I made this data table awesome

I knew that a slope graph was going to be a great way to fix this data visualization. Some people call these slope charts but they are the same thing.

Free download: 10 Slope Graph Examples + Walkthrough Video

Want some inspiration for your next slope chart? Download the PDF example list now.

  • 3-page PDF document with screenshots and links for all 10 slope graphs examples
  • 16-minute interactive Tableau dashboard walkthrough video
  • Keep as a reference to save time on your next Tableau project
  • Impress your co-workers and colleagues!

Download Now

Slope graphs are a great way of showing “before and after” data in an interesting way.

Here’s the problem: most people over complicate Tableau slope graphs.

It’s true: check out all of these people searching for help on Tableau slope graphs.

View post on imgur.com

Now I know why these people don’t know the exact step by step process for creating a slope graph in Tableau. It’s not a “standard” graph. It’s a bit more advanced. So it’s rarely taught in trainings and in classrooms.

But slope graphs are too powerful to ignore and Tableau makes them pretty easy (if you follow the 7 step proven process outlined below).

So, I decided to build the slope graph in Tableau. I also knew that I wanted to add some context to show how well the predictions actually were for The Guardian team.

Here’s the final result (this is the most basic Tableau slope graph)

View post on imgur.com

The 6 Step Process to Create Tableau Slope Graphs

(NOTE: if you want something more advanced, check out the more advanced version down below)

1. Open this Excel file in Tableau

View post on imgur.com

2. Drag Predicted Finish measure to the Rows shelf and drag Actual Finish to the x-axis label to automatically create two bar charts

View post on imgur.com

3. Drag Team to the Label section of the Marks card and change the Mark type to Lines

View post on imgur.com

4. Right-click the x-axis and select Edit from the popup menu and check off the Reverse box in the Scale section so the numbers show 0 at the top of the slope graph and 20 at the bottom

View post on imgur.com

5. Create a calculated field to show the Change from Predicted Finish to Actual Finish and drag that field to the colors section of the Marks card. Adjust the size of the lines as needed (Field Name: Change Calculation: [Predicted Finish] – [Actual Finish])

View post on imgur.com

6. Add line markers, adjust the formatting, and sort the Measure Name fields so that the Predicted column is to the left of Actual column and format as needed.

View post on imgur.com

Here’s the full process in one image if you want to follow along 🙂

View post on imgur.com

Congratulations! You’ve now created your own basic slope graph in Tableau.

Next steps

Of course, there are more advanced options for Tableau slope graphs

Here is a dashboard I built for the same makeover Monday project I mentioned earlier.

View post on imgur.com

Take a look at the differences

  • I added a dashboard title to make the point of the dashboard super obvious
  • I added a short paragraph to give more context to the graphs below
  • I created a few prediction accuracy groups so that we can see how well The Guardian actually did overall with their predictions

But I didn’t stop there

  • Next I added big numbers to the top with color coded circles. The purpose of that section is a) to give some more context on the overall accuracy of their predictions and b) to provide a color legend for the slope graph beneath it. It’s always good to remove extra stuff from a dashboard when possible.
  • Then I created a few calculated fields to show some icons and describe what was showing in the graph. This was a bit overkill, but I had some fun and I think it helped tell the story.
  • For example, I created an up or down arrow based on the prediction vs. reality scoring. I also included the numeric value along with the icon.

I also added some text and emojis to let the reader know if the team performed better or worse than predicted by The Guardian.

I mentioned it before, but these pieces weren’t absolutely critical. They do give some personality to the dashboard and I’m thinking about the intended audience. Remember that the original data table is on the Guardian website so I built my dashboard thinking that it might be dropped in place of the original.

I also adjusted the fonts and colors to match the style of The Guardian article. I think this is always a nice touch and is pretty easy to get done so why not?

Here are the calculated fields I added to my Tableau slope graph to give even more context and add some personality to the dashboard to make it more interesting.

 

Calculated Field Name Calculation
Prediction Change [Predicted Finish] –  [Actual Finish]
Prediction Change Value IF [Prediction Change] < 0 then STR([Prediction Change])
ELSEIF [Prediction Change] > 0 then “+”+STR([Prediction Change])
else “+”+STR([Prediction Change])
END
Prediction Change Status Caps IF
[Prediction Change] < -5 then “Much worse than Predicted”
ELSEIF
[Prediction Change] < 0 then “Worse than Predicted”
ELSEIF
[Prediction Change] > 5 then “Much better than Predicted”
ELSEIF
[Prediction Change] > 0 then “Better than Predicted”
else “Exactly as Predicted”
END
Prediction Change Status IF
[Prediction Change] < -5 then “much worse than predicted”
ELSEIF
[Prediction Change] < 0 then “worse than predicted”
ELSEIF
[Prediction Change] > 5 then “much better than predicted”
ELSEIF
[Prediction Change] > 0 then “better than predicted”
else “exactly as predicted”
END
Prediction Change Indicator IF [Prediction Change] < 0 then “▼”
ELSEIF [Prediction Change] > 0 then “▲”
else “◀▶”
END
Prediction Change Emoji IF [Prediction Change] < 0 then “😓”
ELSEIF [Prediction Change] > 0 then “🤩”
else “😌”
END
Prediction Change Desc IF
[Prediction Change] = 1 then “improved 1 spot”
ELSEIF
[Prediction Change] = -1 then “dropped 1 spot”
ELSEIF
[Prediction Change] < 0 then “dropped “+STR(abs([Prediction Change]))+” spots”
ELSEif
[Prediction Change] > 0 then “improved “+str(ABS([Prediction Change]))+” spots”
ELSE “matched our prediction”
END

A quick recap of everything you’ve learned in this step-by-step guide to creating AWESOME Tableau Slope Graphs

  1. Why slope graphs are a great way to show “before” and “after” data
  2. The 6 steps to creating Tableau slope graphs (sometimes also called slope charts)
  3. How I transformed a boring before-and-after table into an awesome interactive Tableau dashboard

NEXT STEPS: If this post helped you at all (or you think it might be useful to anyone else) please take 12 seconds and share it on Twitter. I even made you a super easy link to make sharing totally brainless 🙂

Free download: 10 Slope Graph Examples + Walkthrough Video

Want some inspiration for your next slope chart? Download the PDF example list now.

  • 3-page PDF document with screenshots and links for all 10 slope graphs examples
  • 16-minute interactive Tableau dashboard walkthrough video
  • Keep as a reference to save time on your next Tableau project
  • Impress your co-workers and colleagues!

Download Now

Tableau & Google Sheets Checklist

This one-page checklist PDF will help you learn how to upload your data into Google Sheets and build an awesome Tableau dashboard without wasting time.

You have Successfully Subscribed!

4 Things For Every Tableau Dashboard Creator

This free 4-page eBook PDF will walk you through the 4 most important steps for creating a Tableau dashboard

You have Successfully Subscribed!

Massive List of Tableau Tools

Tableau is even more powerful with these 20 tools you might not know about. The 2-page PDF includes a description and helpful links for each tool to get you started.

You have Successfully Subscribed!

Career Boosting Business Analytics Trends

Use this list as a road map to take you from boring data job to the GO-TO PERSON in your company that knows the answers to all the questions.

All set! Check your email :)

Massive List of Free Data Viz Books

Download the FULL listing of 10 free data visualization books covering dozens of topics across 100s of pages. All nice and neatly organized in an awesome Google Sheet for you to print or copy.

All set! Check your email :)

Tableau Dashboards: Beginner’s Guide (Free PDF)

Get the full 2-page PDF with the 5 steps outlined in this guide + 3 bonuses to help you along the way

BONUS #1: 5 Beginner mistakes to avoid

BONUS #2: Video walkthrough

BONUS #3: Links to the the Google Sheet and final Dashboard

All set! Check your email :)

How to Create 6 Different Tableau Bar Charts (Free Guide)

Get the step-by-step guide to create all 6 different types of Tableau Bar Charts (with copy-and-paste calculated fields included) for free.

 

All set! Check your email :)

Massive List of Tableau Web Data Connectors(Free List)

Download the list of 21 different Web Data Connectors for Tableau in this Google Sheet (save a copy for yourself, too!) 

All set! Check your email :)

Slope Graph Examples PDF + Dashboard Walkthrough Video

This 4-page example PDF lists 10 examples of slope graphs curated from around the web with author links for each one. You'll also see the 16-minute walkthrough video where I create an interactive Tableau Dashboard from scratch. 

You have Successfully Subscribed!

Download the Tableau Tutorial PDF Checklist & Workbook

The step-by-step checklist for fixing busted charts with Tableau PLUS the full workbook with all of my formatting and calculations for free.

Tableau Tutorial Chart Redesign

You have Successfully Subscribed!

Download the TableauHighlight Tables PDF Guide

The step-by-step guide for creating Tableau highlight tables
(plus direct links to the YouTube video walkthrough and link to final Tableau workbook)

You have Successfully Subscribed!

How to Create 6 Different Tableau Bar Charts (Free Guide)

Get the step-by-step guide to create all 6 different types of Tableau Bar Charts (with copy-and-paste calculated fields included) for free.

 

All set! Check your email :)

Tableau Scatter Plots: The Complete Guide

Get the step-by-step checklist guide to create scatter plots with Tableau

 

All set! Check your email :)