(This is a follow up to the blog post posted on March 17th. If you are looking for a more basic waterfall chart, please start there!)
If you’re interested in taking your waterfall charts to the new level and adding arrow indicators on top of your bars, as in the visual below, feel free to read and build along.
When we left off in the last post on waterfall chart (see here) our visual looked something like this:
We’ll continue to build on what we created in the previous blog post. To add the arrow indicators, follow the steps below.
1) Create a new calculation to specify where on the y-axis you want the arrow to fall. Name it “Arrow Location” and write the following calculation: RUNNING_SUM(SUM([Profit])) + SUM([- Profit]) * .5
2) Drag the new measure “Arrow Location” next to Profit on the rows shelf and change the mark type for Arrow Location from Gantt Bar to Shape.
3) Create a new calculated field to indicate whether the arrow should be pointing up or down. Name the field “Arrow Indicators” and write the following text: IF SUM([Profit])>0 THEN "Profitable" ELSE "Unprofitable" END.
4) Remove the Profit measure from the color tab and the –Profit measure from the size tab in the arrow location tab on the marks card and drop Arrow Indicators onto the Shape Tab on the marks card and choose the upward facing arrow for “Profitable” and the downward facing arrow for “Unprofitable”.
5) Right-click on the Arrow Location measure on the rows shelf and select Dual Axis to overlay the two visuals. Right-click on the secondary axis (Arrow Location) and choose “Synchronize Axis”.
6) If you want to create different size arrows for each quarter based on the size of the bar there are two more steps. First, create a calculated field called “Arrow Size” with the following formula: ABS([Profit])
7) Finally, drop the newly created Arrow Size measure on the size tab on the marks card.
You’ve now successfully created an advanced waterfall chart in Tableau. Congrats and happy data dashboard building!
By: Eric Parker
Posted by admin