Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to divide the duration into intervals like 15 mins,1 Hr,24 Hr...

Hi All,

I am calculating the duration in minutes. means close date and enter date the duration is interval (close date- enter date, 'mm'). using this expression to calculate the duration in minutes.  divide the close date and enter date  into buckets like

                     15 minutes,

                     1 Hour,

                     24 Hour

                  > 24 Hours

temp:

LOAD serviceid,

     [date-entered],

      date_closed

  if(Interval(date_closed-[date-entered],'mm')<= tmie#(15,'mm'),'<= 15minutes',

if(Interval(date_closed-[date-entered],'mm')> tmie#(15,'mm') and Interval(date_closed-[date-entered],'mm')<=tmie#(60,'mm') ,'<= 1 Hr',

if(Interval(date_closed-[date-entered],'mm')> tmie#(60,'mm') and Interval(date_closed-[date-entered],'mm')<=tmie#(1440,'mm') ,'<= 24 Hr',

if(Interval(date_closed-[date-entered],'mm')> tmie#(1440,'mm') , '> 24 Hr',)))) as category,

interval(date_closed - [date-entered]) as duration

         

FROM

(ooxml, embedded labels, table is Sheet3);

<= 15 minutes
<= 1Hr
>  24 Hrs
-

in that expression the Interval(date_closed-[date-entered],'mm') is divide into category.the data fetching only '<= 15 minutes', '<= 1 Hr', '> 24 Hr'  but not fetch the data ' <= 24 Hr' .the duration is divided into category is correct or not otherwise  any one plz tell me right way for that  solution

10 Replies
Not applicable
Author

Thank you Massimo