Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

A waterfall chart is a variant of a bar chart which shows how the value in each category affects the overall total.  To create our chart, we start with a table in the form:

Category

Balance

Coffee

10

Tea

20

Paper

-50

Pens

200

Biscuits

30

Pencils

40

Folders

-2

IT

30

Cups

20

Loading this into Tableau, we can quickly create a bar chart by double clicking on the Balance measure and then on the Category dimension:
Next, turn this into a running total by clicking the options arrow on the Balance pill, choosing Quick Table Calculation, then Running Total.

We now change the Mark type from Bar to Gantt Bar.  Gantt Bars use two values - one is held on the Rows/Column shelf and marks one end of the Gantt Bar, the second is held on the Size shelf and indicates the length of the bar which then gives us the other end.  In this case we're using the running total as the 'end' value and will deduct the category balance from it in order to draw the line back to the previous value.  (e.g. the running total of Coffee is 30+10 = 40, and the size of the bar will be Coffee's balance, -10.  This draws a Gantt bar from 40 down to 30, lining it up with the total from the previous category).  To deduct the category balance, we create a new calculated field called "Inverted Balance" which has the formula:

 -[Balance]

Putting this new field on the Size shelf will fill in the Gantt chart:

To show the running total as the label, hold the Ctrl key and drag a copy of the Sum(Balance) pill onto the Label shelf.  This gives us a waterfall chart showing the start point, the change each category represents, and the final result in the right-most column.  Some aspects are unclear, however - it's not obvious whether Folders has a positive or negative effect without reading the label, and the labels seem to mark the bottom rather than the top of the bar (ideally it would automatically show at either the top or bottom depending on the direction - here we've chosen the top since most values are positive, but if most values are negative it may make sense to show at the bottom).

To change the position of the labels, click the Label shelf, then the Alignment section, and in Vertical alignment, set it to Top:

We can do two things to highlight the direction of change - add colour, and highlight which end of the bar displays the running total.  To add colour, put another copy of the Inverted Balance measure on the Color shelf.  Because we've inverted the number, the default colour scheme will show positive balances as red and negative as green.  Change this by clicking the options arrow on the color legend, and choosing Reversed:
To highlight the running total value, we just need to create a copy of our Running Total formula.  Hold down the Ctrl key and drag the Sum(Balance) pill in the Rows shelf to the right to create a copy of the pill.  Then click the options arrow on the second pill and choose Dual Axis.  This duplicates the value and as they're identical we don't see any difference yet.  Click the options arrow again on the second pill and choose Mark Type -> Gantt Bar.  This will change the Marks shelf so that it includes two mark types which you can switch between using the < and > arrows - the first is our original Gantt bar, the second is our highlight.  Choose the second mark, and remove the Colour and Size measures - this will change the display to a narrow grey line.  Click on the empty Colour shelf and change this to black.  

Download the example waterfall workbook

  • No labels