-
1. Re: Support for "Waterfall" charts
Dirk Karis Apr 10, 2008 10:37 AM (in response to Phil Heinrich)I think you forgot to add the attachment, otherwise I would have used it for the example. Instead, I'll assume you're plotting Sales by Quarter.
You can do this using Gantt Bars and a small trick
1. Place Quarter on Columns
2. Place Sales on Rows.
3. Change Sales to the Running Total table calculation
4. Change the mark type to Gantt Bar
5. Create a calculated field MinusSales as -[Sales]
6. Place MinusSales on the Size shelf.
The reason for the calculated field is that the running total includes the current value. If you use Sales on the size shelf, then the Q1 bar would go from Q1 sales (the running total) to twice Q1 sales (the running total plus the current value).
-
2. Re: Support for "Waterfall" charts
Phil Heinrich Apr 10, 2008 10:58 AM (in response to Phil Heinrich)Thanks for the tip. The only minor problem is that the data labels show up at the bottom of the bars. But that's relatively easy to correct.
-
3. Re: Support for "Waterfall" charts
guest contributor Jun 15, 2008 1:44 PM (in response to Phil Heinrich)Are there any tableau examples that I might download and work with? Especially interested in showing variance analysis (change due to price or qty).
thanks
-
4. Re: Support for "Waterfall" charts
guest contributor Apr 23, 2009 8:07 AM (in response to Phil Heinrich)Excellent article. One more reason to move away from Excel.
Thanks.
-
5. Re: Support for "Waterfall" charts
. glinkot Jul 30, 2009 8:57 PM (in response to Phil Heinrich)Hi there, thought it was probably best to use this old-ish thread than start a new one. I've had a go at the above but my Tableau newbieness has gotten the better of me. The example I tried to create a waterfall chart from is attached.
The idea was to get it to look like the example in the 'waterfallgraph' sheet (which is a good illustration of what a pain it is to do in excel). Preferably it would link to the 'details' sheet which shows the transactions so they can be drilled down into.
If anyone is able to put a packaged workbook up including this data I'm sure it would be useful to myself and others!
Thanks!
-
WaterFallTestData.xls 336.5 KB
-
-
6. Re: Support for "Waterfall" charts
Joe Mako Jul 30, 2009 10:43 PM (in response to Phil Heinrich)I don't know if all the coloring you are looking for can be done (as far as I can figure, to color the last and first bar blue), but hopefully the attached workbook is what you are looking for.
I followed Dirk's instructions, but with "Category" and "Amount" instead of "Quarter" and "Sales".
I did have to add a row to your data source for "Starting Cash" in order to get the results you created in Excel.
To get the coloring, I added the following calculated field to the Color shelf:
iif(Sum([Amount])<0,"Loss","Gain")
Did you want to make use of your date field for anything?
-
Waterfall.twbx 114.2 KB
-
-
7. Re: Support for "Waterfall" charts
. glinkot Jul 31, 2009 12:40 AM (in response to Phil Heinrich)Wow, that looks amazing. It's a pleasure not to have to convert Excel's 'purple and blue' colour scheme and remove lines on every graph.
Thanks so much for that Joe, what a quick and exact response!
The date field was there as a potential filter by period, but I didn't really intend it to be in the graph.
I'm not precious about the colour of the start and end marks, it was just how the excel one happened to be. I guess if I wanted to colour those start and end marks I could create a case statement of some sort.
Cheers mate and thanks again!
Cheers
-
8. Re: Support for "Waterfall" charts
guest contributor Jun 26, 2010 11:56 PM (in response to Phil Heinrich)As soon as I add the calculated field to the color shelf (like joemako did), the negative amounts start their own running total calculation separate from the positive amounts. Any ideas on how I can keep both 'gain' and 'loss' in the same running total?
-
9. Re: Support for "Waterfall" charts
Joe Mako Jun 27, 2010 12:34 AM (in response to Phil Heinrich)Anonymous user (Kpad),
Sounds like a level of detail/aggregation issue.
Does your calculated field look like:
iif(Sum([Amount])<0,"Loss","Gain")
with the "SUM" aggregation?
What does your data source look like, and what fields are on what shelfs? Can you provide some sample non-real data that demonstrates the issue you are seeing?
-
10. Re: Support for "Waterfall" charts
guest contributor Jun 27, 2010 8:58 AM (in response to Phil Heinrich)Joemako,
I copied the formula that you posted a year ago: iif(Sum([Amount])<0,"Loss","Gain"). The data source I am using is the same excel file posted above. Attached is a snapshot. Thank you!
-
Waterfall snapshot.jpg 32.6 KB
-
-
11. Re: Support for "Waterfall" charts
Alex Blakemore Jun 27, 2010 4:31 PM (in response to Phil Heinrich)People would be better able to help debug your workbook if you posted a workbook along with your jpeg snapshot.
-
12. Re: Support for "Waterfall" charts
Joe Mako Jun 27, 2010 5:32 PM (in response to Phil Heinrich)I agree with Alex, can you upload the packaged workbook that gives you that result?
The file uploaded by glinkot on July 30th, 2009 "WaterFallTestData.xls" in not in the correct structure for a waterfall chart in Tableau. I had to reshape it, and my first thought is you reshaped it differently to produce your screenshot.
Your data source should look like the attached Excel file.
-
waterfall structure.xls 19.0 KB
-
-
13. Re: Support for "Waterfall" charts
guest contributor Jun 27, 2010 8:41 PM (in response to Phil Heinrich)Alex and Joemako:
Attached is the file I am using. The data is on sheet 'Details'.
-
WaterFallTestData (1).xls 341.5 KB
-
-
14. Re: Support for "Waterfall" charts
Joe Mako Jun 27, 2010 8:51 PM (in response to Phil Heinrich)Hmmmm, I still cannot see how you generated that screen shot.
Attached is the workbook that I made with your supplied data, can you attach a packaged workbook that contains the sheet from your screenshot?