How to create a bar-in-bar chart in Tableau

A bar-in-bar chart is perfect for visualizing your data according to different categories or subgroups.

Let us then see how to build step-by-step bar-in-bar chart on Tableau. Our goal is to create a graph showing sales and budget sales per product.

Step 1. Create the chart

  1. Connect to the data source (in this case we are not using Sample Superstore).
  2. Drag Budget Sales on Columns.
  3. Drag Product to Rows. You will get a standard bar chart.
  4. Drag Sales on Columns. Right click on it and select Dual Axis.
  5. Select Bar from the Marks card.

 

  1. Create a Calculated field as shown below. Let’s call it Colour and write sum([Sales])>sum([Budget Sales]).

 

  1. Drag the calculation Colour on Color in the SUM (Sales) Marks card. Fit to Entire view.

 

  1. Right click on SUM (Sales) in Columns and select Show Header.
  2. Right click on the Sales axis and select Synchronize axis.
  3. Right click on SUM (Sales) in Columns and select Show Header to hide it again.
  4. Edit colors and size from the Marks card.

 

Don’t wait! Contact us to learn more and continue to follow upcoming news on our website and LinkedIn channel.