Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated duration time

Hi all,

I have a problem with calculated a duration time ( hh mm ss ) for every events occours for each diplay name name : I have one field that contains a date (from data time) and I would like to have a duration time between the change from a result of events and another for each diplay name.

How I can filter in field explanation the part about memory and CPU, for example, ho have the percentage of used and avaible ?

In attach the access file and a qlik file test .

Can you help me please.. it's very urgent for me calculated this value today.

Thanks,

Elisabetta

9 Replies
Not applicable
Author

in attach the qlickview file

Not applicable
Author

Help me please ....!!!

Not applicable
Author

Hi oleg,

my problem is calculated the duration time from an event to an other referred a display name server. I hav only a start time period but I don't have a totime period. So the only mode to calculated the duration time is the difference from the start time of an event to a start time of another event referred to the same display name server.

The source file is an mdb file , that you will find in my post ..

Can you help me please .. I must compile my qlik file today !

Thanks ....

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Elizabetta,

reload your table "Events", sorted by CheckID and Date (descending), and use functions previous() and peek() to get the Date/Time from the previous record (sorted descending, it would be your next event). Decide how you want to calculate the duration for the last event. In the following example, I assign 0 to the very last event.

Try something like this:


Events1:
load
*,
if( previous(CheckID) <> CheckID, 0, peek(FromDate) - FromDate) as EventDuration
resident Events
ORDER BY
CheckID,
FromDate DESC
;
drop table Events;


Not applicable
Author

Hi Oleg,

the script does not run as well ...... there is a message about the virtual memory and it's impossibile reload the data.

SOS

Not applicable
Author

Hi Oleg,

I' don't receive any updates about my qyestion ...... I have aproblem with calculated the difference about the first value to compared with my first TimeString value... How I can modify the script as well as !!????

Thanks thanks -----

Elisabetta

Not applicable
Author

Hi All,

please help me to calculate the different (hh mm ss) from orario_pre and TimeString as is :

orario_pre

precedente

TimeString

EventDuration

31-12-2008 23:10:29

0

31-12-2008 22:16:46

31-12-2008 22:16:46

0

31-12-2008 22:14:51

31-12-2008 22:14:51

0

31-12-2008 22:03:35

31-12-2008 22:03:35

0

31-12-2008 21:55:03

31-12-2008 21:55:03

0

31-12-2008 21:48:44

31-12-2008 21:48:44

0

31-12-2008 21:40:13

31-12-2008 21:40:13

0

31-12-2008 21:27:32

31-12-2008 21:27:32

0

31-12-2008 21:02:07

31-12-2008 21:02:07

0

31-12-2008 19:40:32

31-12-2008 19:40:32

0

31-12-2008 17:58:48

31-12-2008 17:58:48

0

31-12-2008 17:44:23

31-12-2008 17:44:23

0

31-12-2008 17:42:01



Thanks,
Elisazabetta

Not applicable
Author

Hi All,

please help me to calculate the different (hh mm ss) from orario_pre and TimeString as is :

orario_pre

precedente

TimeString

EventDuration

31-12-2008 23:10:29

0

31-12-2008 22:16:46

31-12-2008 22:16:46

0

31-12-2008 22:14:51

31-12-2008 22:14:51

0

31-12-2008 22:03:35

31-12-2008 22:03:35

0

31-12-2008 21:55:03

31-12-2008 21:55:03

0

31-12-2008 21:48:44

31-12-2008 21:48:44

0

31-12-2008 21:40:13

31-12-2008 21:40:13

0

31-12-2008 21:27:32

31-12-2008 21:27:32

0

31-12-2008 21:02:07

31-12-2008 21:02:07

0

31-12-2008 19:40:32

31-12-2008 19:40:32

0

31-12-2008 17:58:48

31-12-2008 17:58:48

0

31-12-2008 17:44:23

31-12-2008 17:44:23

0

31-12-2008 17:42:01



Thanks,
Elisazabetta

Not applicable
Author

Hi All,

please help me to calculate the different (hh mm ss) from orario_pre and TimeString as is :

orario_pre

precedente

TimeString

EventDuration

31-12-2008 23:10:29

0

31-12-2008 22:16:46

31-12-2008 22:16:46

0

31-12-2008 22:14:51

31-12-2008 22:14:51

0

31-12-2008 22:03:35

31-12-2008 22:03:35

0

31-12-2008 21:55:03

31-12-2008 21:55:03

0

31-12-2008 21:48:44

31-12-2008 21:48:44

0

31-12-2008 21:40:13

31-12-2008 21:40:13

0

31-12-2008 21:27:32

31-12-2008 21:27:32

0

31-12-2008 21:02:07

31-12-2008 21:02:07

0

31-12-2008 19:40:32

31-12-2008 19:40:32

0

31-12-2008 17:58:48

31-12-2008 17:58:48

0

31-12-2008 17:44:23

31-12-2008 17:44:23

0

31-12-2008 17:42:01



Thanks,
Elisazabetta