Tableau Tips (Radial Bar Chart)

I have seen some beautiful radial bar charts on Tableau Community for sometime and today I have decided to try it out with the MakeOverMonday 2018 Week 2 data set (What We Look For Romantic Partner).

There are several blogs and videos out there that you can learn how a radial bar chart is being built. For example, a Tableau expert, Bora Beran‘s blog,  SuperDataScience‘s Tableau Tutorial,  Toan Hoang‘s Tableau Tutorial.

One that I’m following today is Toan’s excellent tutorial.

You can pretty much follow how he has created a radial bar chart but I would like to add something that I thought it would be helpful.

The Overview

1) Create ‘Path’

2) Create a Bin with Path

3) Create a Series of Calculated Fields

4) Start Building a viz

5) Apply Tricks

6) Finishing Touches

 

1) Create ‘Path’

Once you connect the data (Sheet1), you drag the same data (Sheet1) just below the Sheet1 (you’ll see ‘Drag table to union). After that you can see ‘Sheet1’ and ‘Sheet11’ on ‘Table Name’ column. This is an important step before creating Path.

Screen Shot 2018-01-13 at 5.57.10 PM

Path (Name of the calculated field)

IIF([Table Name] = ‘Sheet1’, 1, 270)

*This means that if ‘Table Name’ is ‘Sheet1’, assign 1 otherwise 270.                                          * I use 270 because I want to have 3/4 of the full circle as a maximum length.

Screen Shot 2018-01-13 at 6.05.25 PM.png

2) Create a Bin with Path

Right click Path >>> Go to Create >>> Bins >>> Size of bins = 1.Screen Shot 2018-01-13 at 6.10.27 PM

 

3) Creating 8 more calculated fields

Index (Name of the calculated field)

Index() – 1

Max Value

WINDOW_MAX(SUM([Percentage]))

Value (Window Sum)

WINDOW_MAX(SUM([Percentage]))

PI

WINDOW_MAX(MAX(PI()))

Rank

RANK_UNIQUE([Value (Window Sum)], ‘asc’)

Step Size

[Value (Window Sum)]/[Max Value]

X

COS([Index]*[PI]/180*[Step Size])*[Rank]

Y

SIN([Index]*[PI]/180*[Step Size])*[Rank]

*Although ‘Max Value’ and ‘Value (Window Sum)’ look alike, you need both of them in order to create a dial bar chart successfully.

*For those who want to know more about why you create these calculated fields, check out Hoan‘s explanation.

 

4) Start building the viz

  • Drag “Question” into Color as well as Text
  • Drag “Percentage” into Text
  • Change Mark Type from Automatic to Line
  • Drag “Y” into Columns
  • Drag “X” into Rows
  • Drag “Path (bin)” into Path

5) Tricks

  • Click “Y” on Columns >>> Compute Using >>> Path (bin)
  • Click “X” on Rows >>> Compute Using >>> Path (bin)

Screen Shot 2018-01-13 at 6.36.25 PM.png

After this process, you might get something like this, bud do not panic. It is totally fine at this stage.

Screen Shot 2018-01-13 at 7.52.16 PM.png

 

  • Click “Y” on Columns >>> Edit Table Calculation >>> Nested Calculations
  • >>> Choose “Max Value” >>> Select  both “Path (bin)” and “Question” >>> Place “Path (bin)” on top of “Question” >>> Choose Deepest on All the level
  • >>> Choose “Rank” >>> Select both “Path (bin)” and “Question” >>> Place “Question” on top of “Path (bin)” >>> Choose Question on All the level
  • Repeat this process with “X”

 

Now you probably see something similar to what you wanted.

 

Screen Shot 2018-01-13 at 7.53.25 PM.png

If you instead get something like this below,  the solution is

Drag “Path (bin)” into Rows >>> Click Path (bin) and select “Show Missing Values” >>> Take out “Path (bin)”.

Screen Shot 2018-01-13 at 7.33.35 PM.png

Next,

 

  • Drag “Rank (number)” from dimension into Filter >>> Choose 1
  • Drag “Gender” into Filter >>> Choose either one (I chose Men)

Screen Shot 2018-01-13 at 7.55.47 PM.png

 

6) Finishing touches

  • Edit Aliases for Text (Question)
  • Align Text Label properly
  • Adjust Size
  • Change Color to your liking

Screen Shot 2018-01-13 at 8.04.10 PM.png

You might notice that the Question does not add up to 100. This can be solved by adding Nationality into Filter (Choose one country).

*If you have adjusted the Numbers on Format on SUM(Percentage) at a previous stage, you will get 0% on everything after placing Nationality filter.

Screen Shot 2018-01-13 at 8.06.52 PM.png

 

Last bit of refinement is required.

Screen Shot 2018-01-13 at 8.18.36 PM

*If you are trying to use only Gender or Nationality, you have to tweak a little to show true percentage for a single attribute. Make sure what you are presenting is accurate.

 

Congrats!

You have made it through. Hope it was helpful.

 

Happy Visualizing:)

 

 

 

 

 

Advertisements

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