How to build a Bar Chart Race in Tableau Software 2020.x with viz animations

A while ago I shared with you a way to build a barchart race with Tableau 2019.x or less. The first tutorial I made implied to work with data densification and some heavy table calculations. GOOD NEWS, it will be faaaar more easier to build with the new animation feature coming to Tableau 2020.x. Here is how.

Data

I will use only one dataset with three main fields: year, category and value.

Here in the example, categories are countries and value their population across years.

You can find the dataset on the link below:

https://drive.google.com/open?id=1PYaI0ugdynGqpZeyu8iRhEOf4D49zUNd

Viz animation and Rank function

Viz Animations allowed you to see changes in a chart when you use filters or pages. And we will use it! What we want to see are the changes in the ranking. Which categories go up? Wich categories go down?

For that, we need to prepare a Rank calculated field on the value we want to follow.

[Rank] = RANK_UNIQUE(sum([Value]))

And that’s it! It is the only calculated field you require to our new barchart race.

Visualization

Now let’s build the thing!

Bring the Rank field into Rows. Go to Marks and add Category into Details. Right click and make it discrete.

Then bring Value field into Columns. And now it is time to configure our Rank field. Right click on Rank, choose Compute Using and use Category.

We are almost done! Bring Year into Pages. And try to start the animation.

If you do not see any animations, please check if Animations are enabled on you sheet or dashboard.

If you’ve gone that far, you did it! You just have to “pimp” your worksheet with the labels and colors you want to use.

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s