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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

Script to calculate outstanding time of supportcalls

I have a script what have to calculate the outstanding time of support calls. There is a problem with the last record of each call (customer).

I have include an example. In the script there is a further explanation. Can someone help me further ?

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one possible solution might be:

QlikCommunity_Thread_135091_Pic1.JPG.jpg

QlikCommunity_Thread_135091_Pic2.JPG.jpg

QlikCommunity_Thread_135091_Pic4.JPG.jpg

QlikCommunity_Thread_135091_Pic3.JPG.jpg

SET vOfficeOpenFrom = '08:00';

SET vOfficeOpenTo = '17:00';

Supportcalls:

LOAD * INLINE [

    Customer, Startdate,Enddate

    1, 01-01-2014 16:50:00, 03-01-2014 09:10:00

    2, 13-03-2014 16:00:00, 14-03-2014 09:00:00

    3, 13-04-2014 16:00:00, 16-04-2014 16:00:00

];

SupportCallDays:

LOAD Customer,

     DayName(Startdate+IterNo()-1) as Day,

     IterNo() as ID,

     Round((RangeMin(Enddate,Floor(Startdate)+IterNo()-1+Time#('$(vOfficeOpenTo)','hh:mm'))-RangeMax(Startdate,Floor(Startdate)+IterNo()-1+Time#('$(vOfficeOpenFrom)','hh:mm')))*1440) as Minutes

Resident Supportcalls

While DayName(Startdate+IterNo()-1) <= Enddate;

hope this helps

regards

Marco

View solution in original post

1 Reply
MarcoWedel

Hi,

one possible solution might be:

QlikCommunity_Thread_135091_Pic1.JPG.jpg

QlikCommunity_Thread_135091_Pic2.JPG.jpg

QlikCommunity_Thread_135091_Pic4.JPG.jpg

QlikCommunity_Thread_135091_Pic3.JPG.jpg

SET vOfficeOpenFrom = '08:00';

SET vOfficeOpenTo = '17:00';

Supportcalls:

LOAD * INLINE [

    Customer, Startdate,Enddate

    1, 01-01-2014 16:50:00, 03-01-2014 09:10:00

    2, 13-03-2014 16:00:00, 14-03-2014 09:00:00

    3, 13-04-2014 16:00:00, 16-04-2014 16:00:00

];

SupportCallDays:

LOAD Customer,

     DayName(Startdate+IterNo()-1) as Day,

     IterNo() as ID,

     Round((RangeMin(Enddate,Floor(Startdate)+IterNo()-1+Time#('$(vOfficeOpenTo)','hh:mm'))-RangeMax(Startdate,Floor(Startdate)+IterNo()-1+Time#('$(vOfficeOpenFrom)','hh:mm')))*1440) as Minutes

Resident Supportcalls

While DayName(Startdate+IterNo()-1) <= Enddate;

hope this helps

regards

Marco