Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension Grouping

Hi All,

I have a field called ' Number of months with Average billing'. it indicates the number of months a particular customer has been billed on average.

I want to show the number of customers in a chart with average billing but then it becomse very crowded because the average month number start from 1 and end to 30. I want to show this field as a range. For instance, one bar should indicate the number of customers with average billing months between 1 - 5 , then 5 - 10, 10 - 15 and so on. How can i do this?

Please help..

Maria

4 Replies
gandalfgray
Specialist II
Specialist II

Hi Maria

I would prepare for it in the load script, like this:

Load ...

[Number of months with Average billing],

if([Number of months with Average billing]<=5, '1-5',
if([Number of months with Average billing]<=10, '5-10',
if([Number of months with Average billing]<=15, '10-15',
if([Number of months with Average billing]<=20, '15-20',
if([Number of months with Average billing]<=25, '20-25',
if([Number of months with Average billing]<=30, '25-30', '30-')))))) As [Months avg billing Range]
...

Then you can use [Months avg billing Range] as a dimension in charts etc


Not applicable
Author

Goran,

you sure that is the IF condition. because you see condition < 10 applies to < 5 also, and <15 applies on <10 and < 5 and so on...

then how? shouldnt it be like if([Number of months with Average billing] <5=, '1-5',

if(]Number of months with Average billing] < 5 AND <= 10, '5-10',

Please correct me if i am wrong?

gandalfgray
Specialist II
Specialist II

No,

because in my example the second if is in the first if:s else part, the third if is in the second if:s else part etc.

If [Number of months with Average billing] is less than 5 it is taken care of in the first "then", (that is: '1-5'), others the first if:s "else"-part is applied, and that is a new if-statement.

When you arrive there you already know that [Number of months with Average billing] is more than 5

and so on...

Not applicable
Author

ok I got it, Thanks Goran.