4 Replies Latest reply on Mar 30, 2017 5:57 AM by Wildman .

# Bar diagram - Multiple piles in one chart

I'm trying to create a bar diagram which shows the different groups of customers by total quantity (after a selection of the category/region). Hence, I would like that Tableau groups all the customers with a total quantity of for example 1 to 4 and more than 5 in two different piles (next to each other) and sum the total quantity of those two customer groups (see the image for an impression).

I would like to show those 2 piles (next to each other) in one bar diagram. Unfortunately, if I set both the 1-4 and more than 5 filter group on "True" it won't show any bar of course. Hence, a group can't be larger than 5 and be in the 1-4 group.

What would be an easy way to show those 2 piles in one diagram? See the example workbook.

Thanks!

P.s. I'm using Tableau 9.3.

• ###### 1. Re: Bar diagram - Multiple piles in one chart

Would an IF THEN calc solve this:

IF [Volume by Customer Name]> 0 AND [Volume by Customer Name] <5 THEN

'GT 0 LT 5'

ELSEIF [Volume by Customer Name]>= 5 THEN

'GTE 5'

END

Kind Regards,

Graeme

1 of 1 people found this helpful
• ###### 2. Re: Bar diagram - Multiple piles in one chart

Meant to add, put the calculation on columns and remove your T/F filters (as well as from Detail)

Graeme

1 of 1 people found this helpful
• ###### 3. Re: Bar diagram - Multiple piles in one chart

Thanks, this did the trick nicely!

• ###### 4. Re: Bar diagram - Multiple piles in one chart

I have an additional question, if a customer group for example 1-4 doesn't have any volume and does have volume in >5 group I want the histogram to show an empty spot at the 1-4 group in the histogram (next to the pillar of the >5 group). How can I achieve this without creating any "null" data in the database?