Tableau Waterfall Chart is a form of data visualization helps to visualize Running total of any measure against the Dimension. Waterfall Charts in Tableau are very useful to compare Measures over a time period. For instance, visualizing the Profits (Positive or Negative) of a Month or year to increase or Decrease our Production (Decision Making). The SQL Query for this Waterfall Chart demo is
SELECT ProdSubCat.EnglishProductSubcategoryName, Tery.[SalesTerritoryCountry], Prod.EnglishProductName, Prod.Color, Fact.OrderQuantity, Fact.TotalProductCost, Fact.SalesAmount, Fact.TaxAmt, Fact.OrderDate FROM DimProductSubcategory AS ProdSubCat INNER JOIN DimProduct AS Prod ON ProdSubCat.ProductSubcategoryKey = Prod.ProductSubcategoryKey INNER JOIN FactInternetSales AS Fact ON Prod.ProductKey = Fact.ProductKey INNER JOIN [DimSalesTerritory] AS Tery ON Tery.[SalesTerritoryKey] = Fact.[SalesTerritoryKey]
Create a Tableau Waterfall Chart
To create a Waterfall chart in Tableau, drag and drop the Product Subcategory Name from Dimension Region to Columns Shelf and Order Quantity from Measures region to Rows Shelf. By default, tableau generates the Bar Chart.
As we all know, Tableau Waterfall chart is the modern name of the Running total chart so, we have to add Running total to the above specified chart. Please click on the Order Quantity from Row Shelf and select the Quick Table Calculation option and then select the Running Total.
Once you select the select the Running Total, following screenshot will be displayed
Now, Please change the Mark type from Automatic to Gantt Bar. To do this, Please select the Mark Type option for the Order Quantity and select the Gantt Bar.
As you see, we are closer to the Waterfall Chart in Tableau. Now, we have to specify the size of each cell in Gantt bar. So, add one more calculated filed. Select the Create Calculated Field option from the Analysis Menu.
Once you select the Create Calculated Field option, a new window will be opened to write the Custom Expression. For this example, we need negative order Quantity so write the following expression
Next, Drag and Drop the newly created calculated field (Negative orders) from Measures region to Size filed present in Marks Shelf.
As you see our Gantt Bar cells are sized by the negative order Quantity
Let us add some colours to our Tableau Waterfall chart. For now, we use the Rank (Calculated Field) we created in Tableau Bump Chart article to colour the waterfall chart. Drag the Rank from Measures region to Color Field present in Marks Shelf.
NOTE: You can use Profits Measure or KPI trends, Goals On the color shelf to visualize them.
By Default Rank filed will rank using Table Across. So, Please change the table calculation from Table Across to Count of Order Quantity and Sort order by descending
We successfully created a Tableau Waterfall Chart
We forgot to add the Grand Total to complete the waterfall chart. To add Grand Total, Go to the Analysis Menu. Next, Please select the Totals option then select the Show Row Grand Totals option.
See the final preview of our Waterfall chart.