5 Replies Latest reply on Jul 4, 2016 9:24 PM by Mahfooj Khan

# Using percent of total for bucketing

Hi All,

2 measure "Accepted Count" & "Agent id"

1 dimesnions "Region"

O/p:

Region

Accepted count                            2

percent of accepted count          9%

I derived percent of accepted count using table calculations

I need to make buckets using "percent of accepted count" ie 0-25,25-50,50+ displaying count of Agent id

Kindly help.

• ###### 1. Re: Using percent of total for bucketing

You can try something like this

Create a calculated field to get the % of Total.

[percent of accepted count] : SUM([Accepted Count])/TOTAL(SUM([Accepted Count]))

Now use [percent of accepted count] field to create another calc field to bucket

IF zn([percent of accepted count])>=0 AND zn([percent of accepted count])<0.25 THEN 'Bucket1 0-25'

ELSEIF zn([percent of accepted count])>=0.25 AND zn([percent of accepted count])<0.5 THEN 'Bucket2 25-50'

ELSE 'Bucket3 50+'

END

Feel free to ask If you've any query.

Mahfooj

• ###### 2. Re: Using percent of total for bucketing

Had created calculated field for % of total but still it is not bucketing correctly.

• ###### 3. Re: Using percent of total for bucketing

is there any way to show grand total of this?

tried window_sum but no go

• ###### 4. Re: Using percent of total for bucketing

After creation of % of Total field have you created another calc field to bucket using IF..ELSEIF..END statement which I've mentioned in my earlier post. If you still not getting correct output then kindly share the sample workbook in .twbx format with expected answer.

• ###### 5. Re: Using percent of total for bucketing

For grand total, have you tried this

OR

If you still unable to get correct output then kindly share some sample data or sample workbook in .twbx format.