Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to create a days range bucket starting from 0 always like 0-30, 0-60, 0-90...based on days diff.
Ex:
Name Days diff
Harsha 15 (should be in all ranges like 0-30,0-60,0-90.....)
kosuri 55 (should be in both 0-60,0-90.....)
Thanks,
Harsha
Hi harsh,
Please find the attached file for your refernce.
Hi Harsha,
PFA
Hope its useful for you.
Thanks and Regards,
Vishal.
@Sampath
I need the age grouping as 0-30 & 0-60.
@Vishal
You used the pivot table, but I need the values like 0-15, 0-30... as listbox values.
Workaorund:
I have created text box for values 0-30, 0-60, 0-90..... and on the actions i have set condition age(days diff) <=highest value in range.
You can create the bucket field in the script or in the Listbox as an Expression. Two ways I can think of:
=class(Daysdiff, 30)
That gives you the class formatting which you may not like.
0 <= x < 30
30 <= x < 60
Or to get the exact formatting you asked for, use an expression:
=if(len(Daysdiff)>0,
div(Daysdiff,30)*30 & '-' & (div(Daysdiff,30)+1)*30
)
That gives:
0-30
30-60
The if() only seems to be required in the Listbox expression (not the script) to prevent a single row with "-" appearing.
-Rob
Hi Rob,
I need buckets 0-30,0-60,0-90 rather than 0-30,30-60,60-90..
Thanks,
Harsha
Hi Harsha
You can create a table with values like below (this can be done using "load inline");
TableX:
bucket lowerlimit upperlimit
0-30 0 30
0-60 0 60
0-90 0 90
then use IntervalMatch as
IntervalMatch (days diff) LOAD lowerlimit, upperlimmit Resident <TableX>;
this should give you desired result
Regards
Vikas
The intervalMatch solution is a good one.
Or to create the field in UI, with a 0 start, just modify the expression I gave you earlier:
=if(len(Daysdiff)>0,
'0-' & (div(Daysdiff,30)+1)*30
)
-Rob