Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

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
Partner
Partner

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],

Master II
Master II

Hi,

Share your sample data with excel/text format. tks