Waterfall charts look like bar charts, but these specifically show the aggregated effect of a series of positive and negative values. The final bar represents the net value of all the preceding values. Waterfall charts can be useful when the history as well as the final net value is important to be shown. This can be applied, for example, to showing beginning and ending inventory numbers, and showing how the ending inventory number came to be.
In this recipe, we will use the waterfall chart to show cumulative changes in profit for Furniture in the Superstore data set.
To follow this recipe, open B05527_02 – STARTER.twbx
. Use the worksheet called Waterfall
, and connect to the Orders (Sample – Superstore)
data source.
The following are the steps to create a waterfall chart:
A waterfall chart shows the cumulative results of positive and negative values over a series. In our recipe, we are showing how profits for Furniture grow or shrink over time.
There is no native waterfall chart in Tableau. We can create this by using a Gantt mark.
We start by filtering our view for only 2013. We drag discrete month across the columns, and drag Profit measure onto rows. By default, Tableau will create a time series line graph for these fields. We care about the cumulative effects of profit, so we can add the Quick Table Calculation for Running Total.
Next we change the mark type to Gantt, which makes the mark look like a series of underlines. In order to add the actual size of the bar, we use a calculated field called Negative Profit, which is simply the negative value of the profit. The reason we need to negate the field is because if we don't, the Gantt bar will start at the profit value, and then extend the bar downwards if the value is positive and extend the bar upwards if the value is negative.
Once all the fields are set up with the Gantt mark, the Running Total for the SUM(Profit) on the column, and Negative Profit for the size of the Gantt, you should now see that each succeeding bar show the cumulative effect of all the previous profits.
Lastly, we add the total bar by simply selecting the Analysis menu and choosing Totals and Show Row Grand Totals. By default, this shows as the last column, but you can also choose to show row Totals to the Left starting in Tableau v9.2.
The Model Systems Knowledge Translation Center (MSKTC) has a good short document that describes what waterfall charts are, and when they are useful. You can find the document at http://bit.ly/waterfallcharts.
3.14.134.17