Toan Hoang

Creating Pointed Podium Bar Charts in Tableau

A few weeks ago I created a tutorial for making a Podium Bar Chart. This week we are going to draw a Point Podium Bar Chart in Tableau using Polygons. I hope you enjoy this one.

Note: This is an alternative type of data visualisation, and sometimes pushed for by clients. Please always look at best practices for data visualisations before deploying this into production.

Data

We will start by loading the Sample Superstore data into Tableau Desktop / Tableau Public.

Note: If you have Tableau Desktop, you can use the Sample data source, but if you are using Tableau Public, download and load the following data source.

Calculated Fields

With our data set loaded into Tableau, we are going to create the following Bins and Calculated Fields:

@Point Factor Parameter

@Spacing Factor Parameter

Path

IF [Ship Mode] = "First Class" THEN 1 ELSE 5 END

Path (bin)

Index

INDEX()

TC_Sales

WINDOW_SUM(SUM([Sales]))

TC_Max Sales

WINDOW_MAX(SUM([Sales]))

TC_Rank

RANK_UNIQUE([TC_Sales])

TC_Middle

INT(WINDOW_MEDIAN([TC_Rank]))

TC_Order

IF [TC_Rank] = 1 THEN
    [TC_Middle]
ELSEIF [TC_Rank]%2 <> 0 THEN
    [TC_Middle]+([TC_Rank]/2)-0.5
ELSE
    [TC_Middle]-([TC_Rank]/2)
END

X

IF [Index] = 1 OR [Index] = 5 THEN
    0
ELSEIF [Index] = 3 THEN
    [TC_Sales]+([TC_Max Sales]/[@Point Factor])
ELSE
    [TC_Sales]
END

Y

IF [Index] = 1 OR [Index] = 2 THEN
    1
ELSEIF [Index] = 3 THEN
    0.5
ELSE
    0
END + ([TC_Order]*[@Spacing Factor])

Label Rank

IF [Index] = 3 THEN
    [TC_Rank]
ELSE
    NULL
END

Label Sales

IF [Index] = 3 THEN
    [TC_Sales]
ELSE
    NULL
END

Label Sub-Category

IF [Index] = 3 THEN
    WINDOW_MAX(MAX([Sub-Category]))
ELSE
    NULL
END

With this done, let us start creating our data visualisation.

Worksheet

We will now build our worksheet:

If all goes well, you should now see the following:

We will now adjust our data visualisation to get closer to our end product

You should now see the following:

We will now adjust the cosmetics to end up with our final data visualisation:

and we should now see something like this:

Note: Add animations and filters to see this bad boy in action.

and boom, we are done! I hope you enjoyed creating this data visualization and learned some cool techniques as well. As always, you can find this data visualisation on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/PointedPodiumBarChart/PointedPodiumBarChart

Summary

I hope you all enjoyed this article as much as I enjoyed writing it and as always do share the love. Do let me know if you experienced any issues recreating this Visualization, and as always, please leave a comment below or reach out to me on Twitter @Tableau_Magic. Do also remember to tag me in your work if you use this tutorial.

If you like our work, do consider supporting us on Patreon, and for supporting us, we will give you early access to tutorials, exclusive videos, as well as access to current and future courses on Udemy: https://www.patreon.com/tableaumagic

Exit mobile version