3 Replies Latest reply on Aug 28, 2018 9:42 AM by Santiago Sanchez

# Waterfall Chart

Hello Everyone,

I have been trying to create a waterfall chart with some data for quite some time and have had no success. I have attached a packaged workbook with the data I'm working with.

My goal is to have a waterfall chart that shows total prior YTD NIAT on the left side and total current YTD NIAT on the right side, with YOY change by tradebook detail in between the two totals. Ideally it would look something like this:

Let me know if you have any questions or need any additional information.

Thanks,

Derek

• ###### 1. Re: Waterfall Chart

Hi Derek,

This is an interesting one! The workbook attached has a solution for you. If you haven't built a waterfall chart in Tableau before, I'd take a look at this video first: Waterfall Charts.

After covering the basics, there's a couple of nuances to this exercise. For starters, for 2018, we need to show 'Tradebook' details, but for 2017 we don't. We can take care of that with a calculated field:

Once done, we need to calculate the YOY change, which is a bit complicated with this layout given that 2017 and 2018 need to be shown on the view at different granularities (2017 all-up vs. 2018 by Tradebook). To normalize this we can use a level of detail expression (LOD):

We can use similar logic than that of the 'Selector' to show the YOY change for 2018 but not for 2017:

And all set! Make sure to make any filters you need to use as 'Context' filters:

Hope this helps!

Santiago

1 of 1 people found this helpful
• ###### 2. Re: Waterfall Chart

Thank you Santiago!

Could you explain the effect of the context filters? I have never seen these before but I see that they are critical to the view as the results do not appear the way I wish them to unless I use the context filters.

Thanks,

Derek

• ###### 3. Re: Waterfall Chart

You bet. It has to do with Tableau's Order of Operations. Context filters happen before LOD expressions, FIXED in this case. Regular filters happen after a FIXED expression, therefore they are effectively ignored by the calculation we need for the YOY.

1 of 1 people found this helpful