Waterfall charts in Tableau are very useful to show the different contributors to a total.
For example, a common use case is to show the starting position, the final total, and between those two points to see the contributing factors.
Another example is to show total revenue and how it is compiled from the different products.
How to build a waterfall chart in Tableau
To build a Tableau Waterfall chart use the Gantt mark type.
This post will show you how to build the waterfall chart shown below, showing how product sales and discounts make up total revenue.
The dataset I’m using is very simple – it only contains Product and Revenue.
The first thing to do is put the Product on the Columns shelf and the SUM([Revenue]) on Rows.
Change the chart type to a Gantt Bar. This will give you the following:
This looks a long way off the finished article, but there’s only a few more steps and it’s completed.
The next step is to get the bars running after each other and filled in – which means table calculations and a calculated field.
First create a Running Total table calculation on the SUM(Revenue) pill. Right-click on the pill, Quick Table Calculation – Running Sum.
Colour the bars of the Tableau waterfall chart
The next step is to fill in the bars. This requires a calculated field, which is the negative of the revenue.
The formula for the calculated field is [Revenue] * -1
Drag this calculated field to the Size shelf and the bars appear.
Next we want to colour these bars.
A positive number should be a different colour to a negative.
This requires another calculated field. The formula is:
SUM([Revenue]) >= 0
For any values greater than or equal to 0 this returns True. For values less than 0 it returns False.
Drag this field on to the Colour shelf. Your chart should now look like the following:
The final step is to switch on the Grand Totals. This is on the toolbar under Analysis – Totals – Show Row Grand Totals.