Waterfall Chart in Tableau
Introduction:
The Waterfall Chart is one of the most effective and easy way to describe the total change, along with a breakdown of the individual parts that have driven this change. Waterfall charts effectively display the cumulative effect of sequential positive and negative values. It shows where a value starts, ends and how it gets there incrementally. So, it will be very easy to understand both the values.
Tableau needs one Dimension and one Measure to create a Waterfall chart. We are using a Sample store Database for this Chart.
This step-by-step procedure explains how to make a waterfall chart in Tableau- a visualization.
What makes waterfall charts different from a simple running total calculation is that they illustrate how each dimension with a positive value adds to a running total and each dimension with a negative value detracts from a running total.
For this chart below in Figure 1, we will build the following waterfall chart in Tableau which visualizes how each Sub-Category in the Sample — Superstore dataset is contributing to total profit:
Let us look at these in a step-by-step procedure:
Step1:
- First to create a vertical bar chart as shown below in Figure 2. by showing the measure, Profit by rows and Sub-Category by Columns.
2. Next, add a Quick table calculation to the Sum of Profit measure so that it calculates a ‘Running total’ on ‘Table (Across)’ as shown below in Figure 3.
3. After adding the quick table calculation, the view looks like below picture:
4. At this point from Figure 4. above, we can see how the running total has accumulated across our different sub-categories, it is not easy to determine the positive or negative contribution of each individual dimension member.
To make this simpler, we will convert this bar chart showing running total to a waterfall chart with a couple of additional steps.
- First, change the mark type from ‘Automatic’, which is currently bar, to the ‘Gantt Bar’ mark type.
5. To get this view to look like the Figure 5. above, we need the tops or bottoms of each bar to line up at the same points on the Y-axis. To accomplish this, we have to size the Gantt bars in order to extend them. There is a hidden trick involved with this step to get the desired effect.
6. In order to get the Gantt bars for each dimension member to properly line up as shown below in Figure 6, we first have to create a “new calculated field” which takes the measure in the waterfall chart multiplied by negative one. This chart is using the Profit measure (positive), so we will create a new calculated field that equals –[Profit]:
7. Once this calculated field has been created, this is the measure that you drag to the Size Marks Card to create the waterfall effect as shown below in figure 7:
To get the Final look….
Now that we have an effective waterfall chart, but there are a few things we need to fine tune the final product as shown at the beginning of this post:
- Cleaned up the axis formatting to fixed and percentage cu
- Colored the Gantt bars by Profit by dragging the Profit measure to the Color Marks Card; this created the blue and orange color coding which represents positive and negative values below in Figure 8.
- Change the color settings to Purple and Black for positive and negative values to get the effect as shown below in Figure 9.
- Added a total to the far-right side of the visualization by navigating to Analysis > Totals in the top navigation and choosing “Show Row Grand Totals” below in Figure 10.
Conclusion:
- Finally, choose to sort the dimension members by the sequence in which they were introduced or their values by ascending or descending order. As with many uses of Tableau, flexibility is one of the great options.
- These types of choices will depend on the analysis, business requirements, and business questions.
- I hope this helps to get the idea of the Waterfall chart.
References: