This is a tutorial inspired by Andy Kriebel and Ryan Sleeper. You can learn how to make an interactive waterfall chart with parameters that you can apply to almost any dataset you want to use. I will use the ‘Sample – Superstore’ dataset that you comes with the Tableau so you can easily follow along.

The Basic Waterfall

This will set up the basic waterfall chart that will show the structure of the chart and will be further enhanced in the next sections.

  1. Add a Dimension (Ship Mode in this example) to ‘Columns’ and a Measure (Sales) to ‘Rows.
  2. Right-click on Ship Mode and click on ‘Sort’ – This will sort the bars showing the highest to lowest of the categories from the dimension.
    • Sort By – Field
    • Sort Order – Descending
    • Field Name – Sales
    • Aggregation – Sum
  3. Right-click Sales in ‘Rows’, go to ‘Quick Table Calculation’ and then select ‘Running Total’.
  4. In the Marks card, change it from Automatic to Gnatt Bar.
  5. Drag another Sales to the Size in the Marks card.
  6. On the Size mark for SUM(Sales), double-click or right-click and select ‘Edit in Shelf’ to edit the calculation.
    • Add a – minus symbol in front of SUM(Sales).
  7. Right-click on Ship Mode in Columns and repeat step 2 to change the Field Name back to the original field, Sales.
  8. You should now have the basic waterfall ready like the picture below.

Create Parameter and Labels

We now want to create a Parameter to help make this chart more interactive and add a label that will only show depending on the parameter value.

Create Parameter – Ship Mode Parameter

  1. Right-Click the dimension (Ship Mode) and then go to ‘Create’ > ‘Parameter…’
  2. It should bring up a list of Values in the pop up window, add ‘All’ to that list and then drag it to the top of the list. Leave the rest of the settings as it is.
  3. Right-click the newly created parameter and then select ‘Show Parameter’. This will allow you to check your progress as you go through the next steps.
  4. Right-click the Ship Mode dimension and then select ‘Create’ > ‘Calculated Field…’
    • You want to edit it to check if the dimension value = the parameter value. This will return a True or False value (Boolean).
    • I named this calculated field, ‘Ship Mode Para’.
  5. Drag this newly created calculated field to ‘Colour’ under the Marks card.
  6. It should now look something like this depending on the Ship Mode Parameter value selected.
  7. In the Rows section, right-click the Sales and Edit Table Calculation.
    • Compute Using – Specific Dimensions.
    • Tick boxes for the dimension (Ship Mode) and the calculated field made earlier (Ship Mode Para).

Create a label to show the Sales value of the selected parameter value

  1. Create another calculated field and name it ‘Label for Waterfall’.
  2. We want only the Sales to show on the chart for the Parameter value selected.
    • In the calculated field put in, IIF([Ship Mode] = [Ship Mode Parameter],[Sales],NULL)
  3. Drag the ‘Label for Waterfall’ to the Label section on the Marks card.
    • Click on the Label and change the Alignment to Middle.
    • Make any other formatting changes that you wish to do.

Create Reference Lines

If want to highlight the selected parameter further, we can add reference lines as well to make it stand out more. If you just want to skip this, you can straight to the next section for another chart of just the Totals.

  1. We need to make two calculated fields to create the minimum and maximum value for each category.
    • Minimum Reference Line
      IF ATTR([Ship Mode]) = [Ship Mode Parameter]
      THEN RUNNING_SUM(SUM([Sales])) – SUM([Sales])
      END
    • Max Reference Line
      IF ATTR([Ship Mode]) = [Ship Mode Parameter]
      THEN RUNNING_SUM(SUM([Sales]))
      END
  2. Drag both of these to the Detail section in the Marks card.
  3. For both right click and Edit table calculation.
    • Select Specific Dimensions and choose the dimension and the calculated field created during the Basic Waterfall section earlier
  4. On the top-left of Tableau, go the Analytics tab.
    • Under Custom menu, drag the Reference Band and hover it over the sheet which will bring up a pop up menu
    • Drag it to ‘Table’
    • Set the setting as per the image below
      • Band From – Min reference line
      • Band To – Max Reference line
      • Formatting – Your choice

Create Total Bar chart

Now you can create a new chart that give all segments stacked together to give the Total bar chart and we can change the label to show the proportion of each segment.

  1. Duplicate the sheet with the Waterfall chart.
    • Right-click the sheet on the tab on the bottom of Tableau and select ‘Duplicate’
  2. On the duplicated sheet, drag the Ship Mode in the Columns section to the Detail in the Marks card.
  3. Create a calculated field that will serve as a label that shows the percentage of the total (I called it ‘Total Label %’).
    IIF(ATTR([Ship Mode]) = [Ship Mode Parameter],SUM([Sales]) / TOTAL(SUM([Sales])),NULL)
  4. Drag this calculated field to the Label in the Marks tab. Delete other label if it is still there.
  5. Right-click the new Label in the Marks card and select ‘Format…’
    • On the left-hand side there should be a Format menu
    • Under Default > Numbers, change it to ‘Percentage’ (adjust decimal points if needed)
  6. Create a Calculated field of just ‘Total’ which will serve as a header for this chart.
  7. Drag this to the Columns section. This should give it a label on the bottom of the chart.

Create Initial Dashboard

You should now have the basic pieces to make the waterfall chart in a Dashboard.

  1. On the bottom of Tableau, click the icon to create a new dashboard.
  2. Drag a ‘Horizontal’ object to the dashboard.
  3. Add the basic waterfall sheet in the dashboard.
    1. Right-click the title and hide it
  4. Add the Totals sheet next to it.
    1. Right click the title and hide it
    2. Right-click the y-axis and hide it
    3. Adjust the line on the bottom of the chart to match the length of the other chart
  5. If you don’t see the parameter, click on one of the charts then go to the little triangle on the menu next to the chart then Parameters > Ship Mode Parameter to make it show on the dashboard.
  6. From here you can change the style to whatever you want.

 

Further Steps

Currently, the waterfall chart is limited in interactivity with relying on the dropdown menu of the parameter to change the values. If you want to take this a step further learn how to create buttons for the parameter selection, feel free to check out my completed version of this on my Tableau Public Profile and download the workbook to follow over here.

Kier Bituin
Author: Kier Bituin