Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, in my records I have a numeric field named 'SumInsured'.
What I need to do is to band all the records according to the SumInusured field.
Example, I need to have the following:
Band | Record Count |
---|---|
1 -10000 | 10 |
10001 - 20000 | 50 |
20001 - 30000 | 5 |
Any ideas on how I can go about this please?
Use calculated dimension using Class function:
Class(SumInusured , 10000)
it will by default return ranges in format '<= x <'
you can use Replace function on top of it to get the required format:
Replace(Class(SumInusured , 10000), '<= x <', ' - ')
Hi,
You can use AGGR function to get count of records according to SumInsured field. Might be something like this:
Aggr(Count(Cust_ID), SUMINSURED)
Here Cust_ID being the field which you want to count.
Hope this helps!
Hi Shyamal, what I need to know is how to allocate the SumInsured field to a Band
just create a new field in your script as
if(Sum(SUMINSURED)>0 and Sum(SUMINSURED)>100,'0-1000')
Hence you can use it in nested if expression or else just assign a value to it.
Hi,
You can use the class function if you have fixed intervals:
Class(SumInsured, 10000).
If you need to achieve that based on the sum by Cust_ID according to your current selections, you can do it like this:
Class(Aggr(Sum(SumInsured), Cust_ID), 10000)
Hope this will help you.
Hi Jean-Pierre, Class function seems to be what I am looking for. Do you add the class function in the script or in an expression?
Use calculated dimension using Class function:
Class(SumInusured , 10000)
it will by default return ranges in format '<= x <'
you can use Replace function on top of it to get the required format:
Replace(Class(SumInusured , 10000), '<= x <', ' - ')
You can use this function also from the script.
But what I've suggested is to use it in your dimension, to be dynamically changed based on your selections.
Class(Aggr(Sum(SumInsured), Cust_ID), 10000, '-'). Slight modification.