Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Minus enteries in time calucation


I have the following command in one of my calculated expressions inside a straight chart


          (RangeMin(frac(closedate), MakeTime(18))

          - RangeMax(frac(logdate), MakeTime(8)))

          + (NetWorkDays(logdate, closedate-1) * MakeTime(10)) // Only 10 hours per whole day


The expression ensure that a specific time calucation only occurs on weekdays between 8:00 and 18:00.  However I have noticed that if something was logged (logdate) at say: 07:30 and then closed (closedate) at 07:53, it works out the time as -00:07:00. 

What it appears to be doing is calculating the time it was closed against the time the clock start ticking, in this instance it is 8:00.

This only occurs when a call is logged and close outside of the calucation (08:00-18:00), is there any way this can be corrected.



4 Replies

Depending on how you want to deal with calls logged+closed outside working hours you can do some things.

1. Filter those calls out in the load script

2. Add an if statement to your expression that checks if close time and log time are outside working hours so that an interval is only calculated if this is not the case.

talk is cheap, supply exceeds demand
Not applicable

Hi gwassenaar,

Im relatively new to Qlikview, where would I put my IF Statement and what could I use to not calculate cases that are outside of the time window.


Jon Ditchfield

Not applicable

hi, i have the same issue did you get a solution in the end?

Not applicable

Hi Laura,

Unfortunately I have been assign to different work therefore I have had to put Qlikview on the back burner.  However during November I am expecting to go back to this, once I have an answer I will post it on here and ensure you are replied to so it does straight to your e-mail address.


Jon Ditchfield