Discussion Board for collaboration on QlikView Scripting.
May I ask how to do the script to get the processed time for the following data below?
I wanted to get the processed time from Task received time to processed time. The condition is if Processed time-task received time<=15 minutes it is within SLA, otherwise over SLA..
Go to Solution.
if (Interval(Time#(Time2)-Time#(Time1))<=1/24/4, (Interval(Time#(Time2)-Time#(Time1)), sth else)
1 is 1 day
1/24/4 is 15 minutes
Try this in your load script:
if(Action='PROCESSED', Interval(Time#(Time2)-Time#(Time1)) ) as Duration
Please adapt the field names to your model
Thanks for this. But how about the condition of if time2-time1<=15 minutes it is within SLA otherwise, Over SLA?
Okay. Can I ask how 1/24/4 become 15 minutes? Is this a standard format of time for Qlikvew?
Thank you so much!
1/24 is 1 day has 24 hours and 1/24 gives you 1 hour
(1/24)/4 - Gives you 15 minutes (1 hour = 60 mins, 60/4 = 15)
Hope this helps you.
Yes it is a standard of QlikView
1 is 1 day. Today (05 MAR 2014) is 41 703 (the dates are stored like that in QV)
Today, 12:00 is 41 703,5 (half day = 0,5)
Today, 18:00 is 41 703,75
1 minute is therefore: 1/24/60
15 minutes are therefore : 15/24/60 or 1/24/4 (because 4 times 15 minutes per hour)
Try like this
if (Interval(Time#(Time2)-Time#(Time1), 'mm')<=15,
Is your question answered ?
Yup Thanks so much for clarifying