Thinking about the olympics and podiums, so here is a Tableau Quick Tip on Creating a Podium Bar Chart within 10 minutes or less.
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 following 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
We only need to create the following Parameters and Calculation Fields:
TC_Rank
RANK_UNIQUE(SUM([Sales]))
TC_Median
INT(WINDOW_MEDIAN([TC_Rank]))
TC_Podium Order
IF [TC_Rank] = 1 THEN
[TC_Median]
ELSEIF [TC_Rank]%2 <> 0 THEN
[TC_Median]+([TC_Rank]/2)-0.5
ELSE
[TC_Median]-([TC_Rank]/2)
END
With this done, let us start creating our data visualisation.
Worksheet
We will now build our worksheet:
- Drag Order Date onto the Filter Panel and leave all selected
- Drag Sub Category onto the Filter Panel and leave all selected
- Drag Sales onto the Columns Shelf
- Drag Sub-Category onto the Rows Shelf
- Drag TC_Podium Order onto the Rows Shelf to the left of Sub-Category
- Right-click on this pill, go to Compute Using and select Sub-Category
If all goes well, you should see the following:
We now need to adjust our cosmetics to get our final product:
- Hide the TC_Podium Order and Sub-Category Header
- Hide the Field Label for Rows
- Hide the Sales Axis
- Add TC_Rank, Sales and Sub-Category to the Label and format
- Edit the Colour Mark
You want to end up with the following:
and boom, we are done with this Tableau Quick Tip, and I hope you had some seriously good fun; as always, you can find my data visualisation on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/PodiumBarChart/PodiumBarChart
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