Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

date bucket script error

Hello,

I have 2 date fields and am trying to create a date bucket out of both.

I want the bucket to reflect

passed date - 'Now'

Today() and next 3months - '3m'
passed and next 3months -  '0-3m'
3month to 6months     -6m
passed and next 6months -  '0-6m'

6months  to 12 months    - 12m
passed and next 12months -  '0-12m'

12 months to 24 months    - 24m
passed and next 24months -  '0-24m'

24months to 36 months     - 36m
passed and next 36months -  '0-36m'

what will be the best way to achieve this giving I have to date fields to sort through?

I have attached a qlikview with my current method which is not working.

1 Solution

Accepted Solutions
sunny_talwar

14 Replies
dsharmaqv
Creator III
Creator III

sunny_talwar

Why do you say it is not working? I mean I see a Bucket field, what is wrong with it?

didierodayo
Partner - Creator III
Partner - Creator III
Author

Hi Sunny,

first it is not returning the options '0-3m' ; '0-6m' etc..

also on the table objects the buckets are not showing next to the dates.

Thanks for your assistance.

sunny_talwar

0-3 and 0-6? So 0-6 will include 0-3 also?

didierodayo
Partner - Creator III
Partner - Creator III
Author

Yes '0-3' will include passed up to next 3months

'0-6' will include passed up to next 6 months

'0-12' passed up to next 12 months

etc..

is it possible to have this together with in the same bucket (field) as the 3m, 6m, etc..?

what will be the best way in this scenario?

best regards

sunny_talwar

I don't think if statement will work in that case.... you will have to concatenate using where statement. Look here for a similar thing:

Re: group number by range

didierodayo
Partner - Creator III
Partner - Creator III
Author

Thanks Sunny I will try and confirm shortly.

didierodayo
Partner - Creator III
Partner - Creator III
Author

Hi Sunny I have applied the method above but the '0-3' etc.. are still not coming across for some reason. I have attached the doc below.

Thanks

sunny_talwar

This seems to be the same document as before. Did you attach the wrong qvw?