5 Replies Latest reply on Mar 10, 2018 10:47 AM by Gopi Chand

# Bucketing and Counting Customers Within Buckets

We are trying to count the number of customers that fall within a certain percentage impact range by bucketing them using a calculated field.  We were able to:

1. Distinctly count customers by bucket, but we are not able to sum the number of customers in the bucket

2. Count the customers in the bucket, but the %  impact was summed leaving us with one bucket that contained the total number of customers

We need the data to retain the individual customer impacts and bucket them accordingly by counting the number of cutomers in the bucket.

Is there a way to do this? Below is the calculated field for the buckets.

• ###### 1. Re: Bucketing and Counting Customers Within Buckets

Bryce--

I have attached an example that may help. Am I correct in assuming that your Bin calculation is an Aggregate calculation? By this, I mean does that Net Revenue Increase Buckets calculation show up in the measures list in your workbook?

If it does, the attached example may well be the solution you will need. There are a handful of things that I have done in the workbook. I will outline them here:

1. Right click the bin calculation on the Rows shelf and uncheck Ignore in Table Calculations
2. Create something like the Count of Customer calculation
3. Add customer to the level of detail
4. Add this calculation to columns, right click the calculation, hover over compute using, and click customer
5. Create the index()=1 calculation, add this to level of detail, right click the calculation, hover over compute using, and click customer
6. Finally drag this index()=1 calculation to the filters shelf

This results in giving us an aggregate bin and correct numbers for the customers within each.

Hope this helps,

Dan

• ###### 2. Re: Bucketing and Counting Customers Within Buckets

Dan,

Thank you very much for the quick response.  The solution worked.  I do have one question though, the bars are now showing as if there is a small piece of the bar for each customer.  Is there a way to see a solid bar as you have?

Thanks again,

Bryce Cazier

• ###### 3. Re: Bucketing and Counting Customers Within Buckets

Sorry i let this slip under my radar Bryce. My solution should have handled this. Would you mind posting a screenshot of what you see? A screenshot like the one I have attached would be just fine.

Thanks,

Dan

• ###### 4. Re: Bucketing and Counting Customers Within Buckets

Dan,

This solution worked perfectly for us, Thanks!. I have a follow up question, is there a way to show percentage along with numbers, so the bin would be broken by numbers and percentage?

Thanks,

Nimesh

• ###### 5. Re: Bucketing and Counting Customers Within Buckets

Hello Dan Huff,

Though it was a very old post I stuck here and seeking your help. Attached is my screenshot where I'm not getting the total count on top of the bar. Also I'm expecting a single bar instead breaking bar.

Could you please look in to this and help us in getting done.