5 Replies Latest reply on Feb 18, 2018 5:22 PM by lenzy petty

# Distribution by Growth Bucket Chart?

Hello Tableau Experts,

I am hoping someone can assist me with creating a distribution chart by sales growth buckets.  My data are sales by customer, by quarter.  Using a calculated variable, "Yr to Yr Growth by Quarter", I have successfully calculated the year to year sales growth rate by quarter. My next step is the problem.  I would like to know how many customers grew by certain percentage buckets.  For example, I'd like to know that 10 customers grew by negative 20%, 5 customers grew by negative 5%, 15 customers grew by 15%, 30 customers grew by more than 20%.  I am envisioning a bar chart, with my pre-determined growth buckets on the vertical axis and number of customers on the horizonal axis.  I first tried to do this by creating bins, but Tableau did not let me create bins from my calculated variable "Yr to Yr Growht by Quarter."  I next thought that an "IF THEN" statements might work, where I use several IF-THENs to establish my growth buckets.  This variable is called "Growth Buckets If Then Statesments".  Right now, this variable is sorting the sum of all my customers into the bucket for the total.  (At least it is going into the right bucket.)  I can't figure out how to get Tableau to sort my data and put it into the buckets based on individual customers.  If anyone can assist me with this, I would be grateful.  Workbook attached.  Thanks.

• ###### 1. Re: Distribution by Growth Bucket Chart?

Hi Mark,

One possible option may be to place the Customer Name on the level of detail shelf, then change the Yr to Yr Growth by Quarter calculation to Compute Using-->Customer Name. (Right click on the calculation to change this). Hope this helps!

-Tracy

• ###### 3. Re: Distribution by Growth Bucket Chart?

Joe and Tracy,

Thank you both for the input and solution to my problem.  One small question:  I am duplicating the workbook approach that Joe sent using my real data.  With level of detail at customer name level, my bar charts show tiny divider lines indicating each individual customer.  Joe's solution chart was able to make these bars into solid blue lines.  I am guessing that it is a formatting thing, but I can't find in format how to turn my bars from all the tiny divider lines into one solid blue line.  Can you tell me how you did it?  Otherwise, this is a great approach.  Much appreciated!

• ###### 4. Re: Distribution by Growth Bucket Chart?

For the label of the Color shelf, there is a small black triangle, click on that, and you get a context menu to set the border, as in:

• ###### 5. Re: Distribution by Growth Bucket Chart?

Hi Joe,

My question is, "how can you apply the buckets to Total Annual Sales.

For example, how many customers have "Total Annual Sales":

1. Greater than \$10,000
2. Greater than \$5,000
3. Greater than \$1,000

Below is what happened when I tried to do it.