Racing Bar Charts are an engaging way of demonstrating and comparing data for different dimensions over time. If done right, they can tell incredibly compelling stories – like this one, which shows the rise and fall of different video game consoles from 1971 – 2020.

 

Click to view full animation on YouTube

 

As you can see, racing bar charts consist of three pieces of important data:

  • a time period (ie. year, month, day)
  • a category (ie. video game consoles, country’s)
  • an aggregated running total (ie. sales, population)

These, combined with Tableau’s new Viz Animations feature should make creating this type of visualisation a breeze – and it is, kind of.

While there are some great tutorials out there that demonstrate how to build racing bar charts using Tableau, they rely on data that’s already aggregated to the dimensions and periods in question – a step that requires a bit of data wrangling if you’re working with a non-aggregated dataset like Super Store Sales.

 

Thankfully, with the help of a few Table Calculations we can avoid this step, and build a Racing Bar Chart without having to aggregate our data before loading it into Tableau.

In this video tutorial, I’ll be walking you through the six steps to turn any dataset into a cool racing bar chart – using the Sample Superstore dataset to show how it works with non-aggregated data.

You can follow along in the video below – or download a copy of the workbook off my Tableau Public profile.

 

 

Formulas

_C_Total Running Sales
RUNNING_SUM(SUM([Sales]))
☑ Month Of Order Date
☐ Category

_C_Rank
RANK_UNIQUE([_C_Total Running Sale],’desc’)
☑ Category
☐ Month Of Order Date

_C_% of Total Running Sales
[_C_Total Running Sale]/window_max([_C_Total Running Sale])
☑ Month Of Order Date
☐ Category

Annotation / Period Mark
<Page Name>


Related Blogs

How to build a Bar Chart Race in Tableau Software 2020.x with viz animations
A link to Greatified’s blog showing a racing bar chart of country’s populations over time.

Tableau Tip Tuesday: Table Calculations Overview
A great blog from Andy Kriebel explaining how to interpret table calculations work – how to set dimensions, and which boxes to tick.

Kieran Adair
Author: Kieran Adair