5 Replies Latest reply: Apr 2, 2017 9:22 PM by Sunny Talwar

# Creating buckets based on turnover

Hi All

I have the following calculated dimension for Customer Rank:

=If(Aggr(Rank(Sum([Turnover])),[Customer ID])<=10,dual('Top 10',1),dual('Other',2))

Now I would like to create another calculated dimension for Turnover Rank, the buckets are based on:

- 50k+

- 30k to 50+

- 20k to 30k

- 10k to 20k

- 5k to 10k

- 1k to 5k

- <1k

hic how would I re-engineer the Customer Rank into a Turnover Rank.

Thanks, Paul

• ###### Re: Creating buckets based on turnover

Paul, Why cant we create the dimension in script?? I mean in script we can use if else clause adn create a field like you asked Turnover Rank.

• ###### Re: Creating buckets based on turnover

Hi Shiva

It would work in the script for a static dimension, however, Turnover Rank is a dynamic calculation that will change based on user selections.

Regards, Paul

• ###### Re: Creating buckets based on turnover

Would you be able to share some raw data and explain what the desired output needs to look like for the data provided?

• ###### Re: Creating buckets based on turnover

Hi Sunny

The basic premise is to group customer sales into buckets. Unfortunately, cannot provide data as it is customer data, however, it is based on the following:

- Group sales into buckets based on the following ranges for customer:

- 50k+

- 30k to 50+

- 20k to 30k

- 10k to 20k

- 5k to 10k

- 1k to 5k

- <1k

So the end user can select a list for example, Jan-2017, and the sales buckets will reflect sales in each bucket based on customer.

It's basically the opposite of the calculation I posted earlier.

Cheers, Paul

• ###### Re: Creating buckets based on turnover

All I was asking for was dummy (mocked up) data... if providing that isn't possible, then I am not sure I will have a good understanding of what you have. May be someone else can offer better help