MIP Logo

How to create a nested bar chart in Tableau

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

In this blog post, let’s see how to create a nested bar chart. This chart is also known as overlapped bar chart.

For this we are using the ‘Sample – Superstore’ dataset and we are going to create a visualization for ‘Sales and Profit by Category’.

Step 1:

First, let’s add the categories to rows shelf. Here, we will add both ‘Category’ and ‘Sub-Category’ as it provides more details.

Step 2:

Next, we can add the measure values (Sales and Profit) to the Column Shelf. This will automatically create a bar graph and we can see the distribution of profits and sales across different categories.

Step 3:

As the next step, let’s copy the measure names to ‘Size’ in the Marks window. Now, you will be able to see that it has allocated different sizes to Profit and Sales.
In this case, profits are shown in smaller bars compared to Sales.

Step 4:

For a better view, let’s add ‘Measure Names’ to colour card. And here I have used two contrasting colours for a better view.

Step 5:

Next step is to lay profit bars over sales bar. In order to do that, go to the ‘Analysis’ tab and select the ‘Stack Marks’ option and set it as ‘Off’.

Now, you will see a view like below.

Step 6:

The next step is all about formatting. Let’s increase the size of the profit bars and edit the title.

So, here’s our nested bar chart.

Share this post