I am not sure I understood the additional dimension - too many numbers for my head, 8 windows, 6 samples, 5 samples... so I got lost. However, if this helps, in the first search, the range bands wer...
See more...
I am not sure I understood the additional dimension - too many numbers for my head, 8 windows, 6 samples, 5 samples... so I got lost. However, if this helps, in the first search, the range bands were simply defined as the age and then a fixed 14400 window. If you want to change the window as well, then you can use another array, i.e. | eval age_ranges=split("1,6,11,31,61,91,121,241",",")
| eval window=split("1800,3600,5400,7200,14400,14400,14400,14400",",")
...
``` Band calculation ```
| foreach 0 1 2 3 4 5 6 7
[ eval r=tonumber(mvindex(age_ranges, <<FIELD>>))*60,
s=tonumber(mvindex(window, <<FIELD>>)),
zone=if(age < s + r AND age > r, <<FIELD>>, null()), range=mvappend(range, zone) ] but again, not sure I understood the requirement