How to Create a Rotating KPI in Five Steps With Tableau

Follow this demo to add some dramatic flair to your next dashboard

Rho Ackerman
Nightingale
4 min readMar 18, 2020

--

This is a short demo about how to create a rotating KPI view in Tableau

In Tableau version 2020.1 we have the opportunity to include animations. The rotating KPI view is not easy to create and is for intermediate to advanced Tableau users.

Step 1: Connect to data

This animation needs to iterate through the data in order move the KPIs around in a circle. The way I’ve done this is by essentially creating 10 rows of data for each data point. First I create a csv file with the numbers 1 to 10, then I joined the CSV file with my data source on 1 = 1.

Hopefully this will make more sense later on.

Create CSV file

The first thing to do is to create a NumberIndex.csv file with one column called “Number” that has values from 1 to 10:

Create data source

Step 1: connect data source

1. Connect to excel “Superstore” data source

2. Drag the “Orders” sheet into the view

3. Connect to text file

4. Drag in the file created above

5. Connect on “Join Calculation” 1 = “Join Calculation 1”

Step 2: Setup variables

Next I created variables that will space the KPIs neatly on a circle using trigonometry.

Create “Number of Marks” Parameter

Create calculated fields

  • Create and “Index” calculated field
  • Create “Sin x” calculated field
SIN(([Index]+MAX([Number]))*2*PI()/[Number of Marks])
  • Create “Cos x” calculated field
cos(([Index]+ MAX([Number]))*2*PI()/[Number of Marks])

Step 3: Build view

Next add all the fields to view.

Add the fields to the view

1. Add the “Sin x” calculated field to the columns shelf

2. Add the “Cos x” calculated field to the rows shelf

3. Add the “Index” calculated field to details

4. Add the “Sub-Category” dimension to text

5. Add the “Sales” measure to text

Add the filters

  • Add the “Sub-Category” field to the filters shelf. Select the “Top” tab. Set the Top 5 by SUM of Sales
  • Add the “Number” field to the filters shelf. Select the Condition tab

Set up pages

Add the “Number” field to the pages shelf.

Use “Sub-Category” to compute the table calculation

Set the calculated fields “Index”, “Sin x” and “Cos x” to refer to the “Sub-Category” field in the table calculation. Also sort “Sub-Category” by SUM(Sales).

Step 4: Add animation

Switch on animation. Press play on the pages card and watch your KPIs go round and round.

Step 5: Format

Tableau has many formatting options, here are a few that I used but play around to see what you like.

  1. Remove lines
  2. Remove “Show header” for both axis
  3. Add a dark background

Next steps

You can change the number of marks by updating the filters and the “Number of Marks” parameter.

You can add a background image. On a dashboard, add your image then add this view as floating object.

You can apply this technique on your own data to provide a dramatic header for your next dashboard.

Author short bio

Rho Ackerman is a Business Intelligence Specialist and a Chartered Management Accountant with an MSc in Strategic Business Management. https://www.linkedin.com/in/rho-ackerman-0274a732/

--

--

Rho Ackerman
Nightingale

Business Intelligence Specialist and Chartered Management Accountant with a MSc in Strategic Business Management