Tableau Rings 45


Facebooktwittergoogle_pluspinterestlinkedinmailFacebooktwittergoogle_pluspinterestlinkedinmail

rings13

I love building visualisations with Tableau and in this walkthrough, we are going to build Radial Bar Chart which I like to refer to as a Rings. For my data set, I am going to use the #MakeoverMonday’s American Biggest Bandwidth Hogs data set.

Note: This information can be displayed using Bar Charts and many would argue that it would be more effectively, but let us put that aside for a moment and use this as an opportunity to explore how this can be done.

The Data

The walkthrough requires a very simple data set. Create the following in Excel and access this in Tableau.

rings01

Note: For path, we want 1 to 270 as we only want to draw three-quarters of a circle with the maximum value representing the 270 degrees and the lower items being a proportion of the maximum.

Ring Variables

We will create a Path (bin) object by:

  • Right click on Path
  • Go to Create, Bins…
  • In Edit [Path] set the Size of bins to 1
  • Click Ok

rings10

The Path (bin) will allow us to use a table calculation to create additional data points between 1 and 270.

Note: we are using the Path (bin) to densificate date and give us more points to work with. One thing to make sure of is that you check the Show Missing Values.

We will now need to create the following Calculated fields:

Index: returns the index of the current row within a partition. Index starts are 1 but we want our index to start at 0 so we subtract 1.

rings02

PI: To be able to multiple our Index (based on the bin object) by PI we will need to create a Table Calculation to represent PI.

rings03

Max Value: As with PI we want to be able to access the maximum value within the Window.

rings04

Value (Windows Sum): This Table Calculation is required to get the maximum value for each name.

rings07

Step Size: As all the values will be relative to the Maximum value we are going to need to find the proportion.

rings06

Rank: We are going to us this Calculated field to order the Rings i.e. largest on the outside and smallest on the inside.

rings05

Y: As we are drawing the polygons we need an Y point.

rings09

Note: the SIN function requires the values in Radians as opposed to degrees. To convert Degrees to Radians we need to multiply by PI and divide by 180.

X: As we are drawing the polygons we need an X point.

rings08

Now that we have the required Calculated Fields we can start building our Rings.

Rings Worksheet

Let us start by adding our objects.

  • Drag Name into Color
  • Drag Value (Windows Sum) into Label
  • Drag Name into Label
  • Set the Marks Type into Line
  • Drag Path (bin) into Path
  • Drag Y into Columns
    • Right click on Y, go to Compute using, Select Path (bin)
    • By doing this you will ensure that all calculated fields in Y will be computed by Path (bin)
  • Draw X into Rows
    • Right click on Y, go to Compute using, Select Path (bin)

You should now see the following:

rings11

Yes, I know that it looks nothing like our desired visualisation but we will now update the X and Y Calculated Fields:

  • Right Click on Y and choose Edit Table Calculations…
    • In the Calculated Fields drop down choose Max Value
    • In Compute using select Advanced…
    • Add Path (bin) and Name to Addressing
      • Ensure that Path (bin) is at the top
      • Click Ok
    • With At the level select Deepest
      • Click Apply
    • In the Calculated Fields drop down choose Rank
    • In Compute using select Advanced…
    • Add Path (bin) and Name to Addressing
      • Ensure that Name is at the top
      • Click Ok
    • With At the level select Name
      • Click Apply
    • Click Ok to close the window.
  • Right Click on X and choose Edit Table Calculations…
    • In the Calculated Fields drop down choose Max Value
    • In Compute using select Advanced…
    • Add Path (bin) and Name to Addressing
      • Ensure that Path (bin) is at the top
      • Click Ok
    • With At the level select Deepest
      • Click Apply
    • In the Calculated Fields drop down choose Rank
    • In Compute using select Advanced…
    • Add Path (bin) and Name to Addressing
      • Ensure that Name is at the top
      • Click Apply
    • With At the level select Name
      • Click Ok
    • Click Ok to close the window.

You should now see the following:

rings12

After adding some cosmetic tweaks we end up with the following Dashboard:

rings13

I hope you have enjoyed this quick tutorial and do let me know if you found this useful. Do let me know if you have any comments or feedback.

 

Facebooktwittergoogle_pluspinterestlinkedinmailFacebooktwittergoogle_pluspinterestlinkedinmail

Toan Hoang

About Toan Hoang

Toan Hoang is a technology enthusiast with a broad understanding and appreciation of most aspects of technology but with a passion for Business Intelligence Solutions and Technologies, Data Management and Web Programming.


Leave a comment

Your email address will not be published. Required fields are marked *

45 thoughts on “Tableau Rings