How can I create a waterfall-like chart from multiple calculated measures? In this instance, it is not possible to pivot the data source because some of them contain table calculations.
Follow along with the attached packaged workbook to the right of this text in the "Attachments" section.
In the attached CSV file, WaterFall_SampleData.csv, there are only three measures: Net Sales, Cost of Sales, and SGA. In the following steps, Gross Profit and Operating Income are calculated in Tableau Desktop to create a waterfall-like chart using these measures.
[Net Sales]-[Cost of Sales]
[Net Sales]-[Cost of Sales]-[SGA]
CASE [Segment] WHEN "Consumer" THEN TODAY() WHEN "Cooperate" THEN TODAY()+1 WHEN "Home Office" THEN TODAY()+4 END
CASE INDEX() WHEN 1 THEN 'Net Sales' WHEN 2 THEN 'Cost of Sales' WHEN 3 THEN 'Gross Profit' WHEN 4 THEN 'SGA' WHEN 5 THEN 'Operating Income' END
CASE INDEX() WHEN 1 THEN TOTAL(SUM([Net Sales])) WHEN 2 THEN TOTAL(SUM([Cost of Sales])) WHEN 3 THEN TOTAL(SUM([Cost of Sales])) WHEN 4 THEN TOTAL(SUM([Cost of Sales])) WHEN 5 THEN TOTAL(SUM([Net Sales])) END
IF INDEX() = 1 THEN -[Set Gantt Starting Point] ELSEIF INDEX() = 2 THEN -[Set Gantt Starting Point] ELSEIF INDEX() = 3 THEN TOTAL(SUM([Gross Profit])) ELSEIF INDEX() = 4 THEN TOTAL(SUM([SGA])) ELSEIF INDEX() = 5 THEN -TOTAL(SUM([Operating Income])) END
IF INDEX() = 1 THEN TOTAL(SUM([Net Sales])) ELSEIF INDEX() = 2 THEN TOTAL(SUM([Cost of Sales])) ELSEIF INDEX() = 3 THEN TOTAL(SUM([Gross Profit])) ELSEIF INDEX() = 4 THEN TOTAL(SUM([SGA])) ELSEIF INDEX() = 5 THEN TOTAL(SUM([Operating Income])) END
001456950
0 KB
24 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.