Waterfall chart using multiple measures in Tableau
Hello friends! recently I got a requirement where the I had to create Waterfall chart using different measures. Data was not static but the format/structure was constant. Also data transformation was not allowed.
This is very simple to create it, follow the steps to achieve it.
The data format is look something like this. As you can see that the data is wide format not in the long format Day1,2.. are separate columns.
As a step 1 create a new excel sheet with just measure you want to add in the waterfall chart. I want Day1,2.. so I created a column with the measure names.
Now add these data sets to Tableau and in the sheet which has measure names create calculated fields as below.
CASE ATTR([Measure]) WHEN 'Day1' THEN SUM([Data (Waterfall)].[Day1]) WHEN 'Day2' THEN SUM([Data (Waterfall)].[Day2]) WHEN 'Day3' THEN SUM([Data (Waterfall)].[Day3]) WHEN 'Day4' THEN SUM([Data (Waterfall)].[Day4]) WHEN 'Day5' THEN SUM([Data (Waterfall)].[Day5]) END Data (Waterfall)- Is the data source with actual data
Now start creating the waterfall chart. Using the Measure name data set place
1. ‘Measure’ to Columns, Calculated field to Rows and make it running total
2. Chart type to Gantt Bar
3. -ve of calculated field to size
4. Calculated field to Label and done.
Keep visiting Analytics Tuts for more tutorials.
Thanks for reading! Comment your suggestions and queries.