Have you ever struggled to create a Tableau chart with stacked bars and a line over a period of time?
Open Tableau and follow these instructions:
1. Drag and drop your date pill on your Columns shelf, right click on it and select “Exact Date”.
2. Tableau will transform it in Continuous, you’ll have to right click it again and select “Discrete”.
3. Now it’s time to include some numbers that will become our bar values.
Drag and drop the Revenue pill into the Rows shelf.
4. Drag and drop the Forecast pill that we want to become our line values to the Rows shelf.
5. On the Marks section, open the Revenue and select Bar in the dropdown menu:
6. Let’s create the stacked bar, which will be per subdivision.
Drag and drop the Subdivision pill to the Color button.
7. Right click the bottom Y axis and choose “Dual Axis”
8. Right click it again and select “Synchronize Axis”
This step is very important and only applicable when you have the same unit and magnitude for both axes. In this case, we have Revenue and Forecast, and both are money and have the same magnitude. You won’t want to do this step if you’re using money value in one axis and percentage in the other axis. It’s okay for them to be shown together, but you can’t synchronize their axis because they’re not the same unit and neither the same magnitude.
A very simple and useful tip that is applicable to many situations.
Need more help?
We have plenty more How To Guides here: