Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Karahs
Partner - Creator
Partner - Creator

Calculate Days bucket

Hi everyone,

I need to calculate number of days and buckets as shown bellow with respect to following to dates:

d.PNG

Advanced0-3031-45>45
eg.Before Posting Dateeg.Between Posting Date and Due dateeg.After Due Date + 15 dayseg. Due Date +15 days

Thanks & Regards,

Kshitija

3 Replies
guruprem
Partner - Creator III
Partner - Creator III

You can try something like this:

IF (

Interval(Date1-Date2,'d') < 0 , 'Advanced',

  IF ( Interval(Date1-Date2,'d') <= 30 , '0-30',

  IF ( Interval(Date1-Date2,'d') <= 45 , '31-45',

          '>45'))) as [buckets group],

devarasu07
Master II
Master II

Hi,

Share your sample data with excel/text format. tks