Building a speedometer gauge in Tableau

Everyone knows that Tableau does not have a native Gauge, so video in Portuguese explain how to make it possible.

 

Also, I've included all the steps in English to make your life easier:

 

 

Follow all the steps below:

 

1º - DATA SOURCE 
 
Open Tableau and select the Super Store Sample as data source. You can remove all the folders, but keep the data source.
 
2º - CREATE NEW WORKSHEET 
I created it as Demo Table. All the reference will be created using sales and sub-category data.
 
3º - TRIGONOMETRY 
Because we are working with a circle, we need to create new variable to work with PI, being Sin for Y and Con for X.
 
4º - NORMALIZED SALES
To work as gauge reference, we need to convert the values to normalized sale values creating this new calculated field called: "Normalized Sum" with this content:
sum([Sales])/WINDOW_MAX(sum([Sales]))
 
5º - X All Sub-Category
For that step we are creating the reference for X (considering the trigonometry) to create the cosine (cos). The new calculade field is: "X All Sub-Category" with this content:
-cos(-[Normalized Sum]*PI())
 
6º - X All Sub-Category
The same for Y, we are creating the reference for Y (considering the trigonometry) to create the sine (sine). The new calculated field is: "Y All Sub-Category" with this content:
-sin(-[Normalized Sum]*PI())
 
7º - SUB-CATEGORY PARAMETER
Based on the sub-category field, create -> parameter. It will automatically create a new field named as "Sub-Category Parameter".
 
8º - X - Position
This is a new calculated field to show the position according to the data. So, we are creating a new calculated field called: "X" with this content:
if max([Sub-Category])=([Sub-Category Parameter]) then [X All Sub-Category] else 0 end
 
9º - Y - Position
The same for Y, this is a new calculated field to show the position according to the data. So, we are creating a new calculated field called: "Y" with this content:
if max([Sub-Category])=([Sub-Category Parameter]) then [Y All Sub-Category] else 0 end
 
10º - X AXIS - Set Up
Now, we need to set up the axis for X. Select the X axis and change it to fixed starting in -1.05 to 1.05
 
11º - You AXIS - Set Up
The same for Y, we need to set up the axis for Y. Select the Y axis and change it to fixed starting in 0 to 1.1
 
11º - POINTER
To build a pointer, we need to drag X to columns and Y to lines. Once you have done it, change the marks to line. 
 
12º - GAUGE IMAGE
Load a new gauge image going to Map -> Background Images -> Sample SuperStore. You can use the attached in my blog that is called: Gauge01.jpg
Set up the X axis from -1 to 0 and Y from 0 to 0
 
13º - FORMATING THE POINTER
To make the gauge pointer nicer, we can format the pointer to be like an arrow. So, create a calculated field called: "Pointer Base" with this content:
if max([Sub-Category]) = ([Sub-Category Parameter]) then 0 else 2 end
 
Once it has been created, drag it to size.
 
 

Gráfico de Velocímetro com Tableau (Gauge)

Source: https://www.youtube.com/watch?v=lqr9YmyiU5M

 

Gauge Image:Gauge01.jpg (31239)

Tableau Work File: Gauge01_SuperStoreDatabase .txt (546838)  (rename the extention to twbx)