I started working with Tableau and found out how to do waterfall charts (Gantt-charts, rolling sum for y-axis and a negative value for the length of the bar.

What I want?

Split the colour by some category?

Here is a sample of what I want, the first one without a split by a category and the second one with a split by category.

Jun 28, 2018 in Tableau 1,598 views

## 1 answer to this question.

It is as simple as dragging the right field to Color, and adjusting the table calculation.

If it's a simple running sum (for the positioning of the bar), you need to go edit the table calculation, select Compute using Advanced..., then drag all fields to addressing. Then you need to sort your data by the master field (in your case the one that has Coffee, Coke,...) maximum (ascending or descending, doesn't matter).

This way you guarantee that the running sum is being applied to one category at a time (at not one color at a time or something like that).

It's really important to understand the concept of table calculations so you can understand what's going on, how Tableau is calculating stuff. Read this http://onlinehelp.tableausoftware.com/current/pro/online/en-us/help.htm#calculations_tablecalculations_understanding_addressing.html

And if you actually understand what you're doing, it's easier to find a solution. For instance, this hack of Gantt Chart to make a waterfall. What goes on rows the chart will understand at starting point of the data, and what goes on size is, well, the size of the chart. You put negative values cause you want the bar to go down. That being said, dragging a field to color won't mess up with the size, but it will mess up with the running sum used to determine the starting points. How to solve it? make it calculate all the colors together. How to make it? Understand table calculations and reach my solution.

This is the simple approach, if your database or fields have some peculiarity, this might not work perfectly, and you'll need to explain so I can try to understand how to solve

• 5,550 points

## Creating a dual axis chart with same measure in Tableau

Yes, this is possible. Drop the measure in ...READ MORE

## Tableau- Pie Chart with Multiple Measure Values

Hi Nithin, Pie chart is used to show ...READ MORE

## create a double donut chart in a single view with two measure values in tableau

Let's have a look at how to ...READ MORE

## How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE