Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Nirpanthan
Contributor III
Contributor III

Age Bucket

Hi all,

I want to create an age bucket based on ,  open ticket  with  last  reloadedtime()

considering date as last reloaded time and ticket created time.

thanks in advance

<bar chart:
open tickets by age bucket
(< 1 day, 1 day, 2 days, 3 days, 4 days,
5 days, 6 days, 1 week +>

 

1 Solution

Accepted Solutions
Dalton_Ruer
Support
Support

You can simply subtract 1 date field from another. 

ReloadField - TicketOpenedField

Since both are likely timestamp values you will have decimals involved. Which may be a good thing if you want to know that something may be a few hours after 1 whole day. 

But if you only want to know in terms of sheer calendar dates then you will want to use the FLOOR function. 

Floor(ReloadField) - Floor(TicketOpenedField)

Then you can either use the CLASS function to auto bucket or simply use a series of nested IF conditions. 

View solution in original post

1 Reply
Dalton_Ruer
Support
Support

You can simply subtract 1 date field from another. 

ReloadField - TicketOpenedField

Since both are likely timestamp values you will have decimals involved. Which may be a good thing if you want to know that something may be a few hours after 1 whole day. 

But if you only want to know in terms of sheer calendar dates then you will want to use the FLOOR function. 

Floor(ReloadField) - Floor(TicketOpenedField)

Then you can either use the CLASS function to auto bucket or simply use a series of nested IF conditions.