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
- Connect to the data source (in this case we are not using Sample Superstore).
- Drag Budget Sales on Columns.
- Drag Product to Rows. You will get a standard bar chart.
- Drag Sales on Columns. Right click on it and select Dual Axis.
- Select Bar from the Marks card.
Â
- Create a Calculated field as shown below. Let’s call it Colour and write sum([Sales])>sum([Budget Sales]).
Â
- Drag the calculation Colour on Color in the SUM (Sales) Marks card. Fit to Entire view.
Â
- Right click on SUM (Sales) in Columns and select Show Header.
- Right click on the Sales axis and select Synchronize axis.
- Right click on SUM (Sales) in Columns and select Show Header to hide it again.
- 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.