Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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],

Highlighted
Master II
Master II

Hi,

Share your sample data with excel/text format. tks

Highlighted