The rank chart gives the ranking of the dimension based on certain measures over a period of time. In this blog, I will demonstrate how to build the rank chart in tableau and how we can build a matching color square shape in the background for each period of time. For this, I will be using the famous Sample_Super_Store Dataset.

First, bring the months into the rows pill. Drag sales into the columns and drop region into the color marks. It will give us the line chart for the different regions.

Select dropdown from sales and go to “Quick Table Calculations” and select Rank as calculations. In order to fix this calculation go to “Edit Table Calculation” and select the specific dimensions and check the region box.


Right-click on “rank of sales” > “edit axis”> “Scale Reversed”.It will arrange ranking in ascending order. Now make it dual-axis. Reverse the scale and don’t synchronize the axis. Select Gantt Bar type for one of the sales pills in the column. Create the calculated field “Min” as shown in the picture below. Drag this calculated field into the size mark for the Gantt bar. It will act as a placeholder and help to control the size of the square shape.

Reduce the opacity from the colors mark of the Gantt bar and turn on the labels by selecting the “Lines End” option. We are all done, give it a go 🙂

Saqib Saeed
Author: Saqib Saeed