Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
momofiore
Creator
Creator

calculation duration time

Hey guys

i m trying to calculate the time spent by each (organisation) for each (ticket) using (activityDateTime) in this data and store this duration in an other label. somebody helps me please to write a script to do this. thanks guys. here u can find data with .xlsx extension

NOTE: please note that same (ticket) goes from an (organisation) to an other many times.

here u can find 2 examples of (ticket) with 2 (organisation)

8 Replies
agomes1971
Specialist II
Specialist II

Hi,

please see this...

Calculating time diff in Qlikview

HTH

André Gomes

Chanty4u
MVP
MVP

what is the logic to caluclate the duration? 

opendate-resolveddate?   and what is activitydatetime?

shiveshsingh
Master
Master

Do you need difference of two columns here? how are you calculating the time spent?

YoussefBelloum
Champion
Champion

Hi,

try this for time spent by ticket and by organisation (in minutes for example):

momofiore
Creator
Creator
Author

hey.

no . i de like to calculate total time on minut that each organisation spent on each ticket using (activitydatetime).

for example (organisation) NORD spent 1 days 2 h in (ticket)  ER:1324309.

how do i calculate this. i based my calculation on row of (activitydatetime)

-->for ER:1324309:

1) first activity was on 01/05/2018 07:39:45  ,this activity made by (organisation) SUD

2) second activity was on 01/05/2018 07:41:01  ,this activity made by (organisation) SUD

3) spent time is (01/05/2018 07:41:01)-(01/05/2018 07:39:45)=0 day 0 h 1 min 16 sec

-->then  i calculate the time for organisation (NORD)

ultimatly i will store the time spent by each (organisation).

for example

-->for ticket ER:1324309:

SUD spent 0 day 1 h 5 min 16 sec

NORD spent 0 day 1 h 7 min 13 sec

hope i explained more. thanks

momofiore
Creator
Creator
Author

hey @youssefbelloum. you are to close. i found some mistake in ur calculation. because the ticket goes from  organisation to an other. u should take this in consideration.

no . i de like to calculate total time on minut that each organisation spent on each ticket using (activitydatetime).

for example (organisation) NORD spent 1 days 2 h in (ticket)  ER:1324309.

how do i calculate this. i based my calculation on row of (activitydatetime)

-->for ER:1324309:

1) first activity was on 01/05/2018 07:39:45  ,this activity made by (organisation) SUD

2) second activity was on 01/05/2018 07:41:01  ,this activity made by (organisation) SUD

3) spent time is (01/05/2018 07:41:01)-(01/05/2018 07:39:45)=0 day 0 h 1 min 16 sec

-->then  i calculate the time for organisation (NORD)

ultimatly i will store the time spent by each (organisation).

for example

-->for ticket ER:1324309:

SUD spent 0 day 1 h 5 min 16 sec

NORD spent 0 day 1 h 7 min 13 sec

hope i explained more. thanks

momofiore
Creator
Creator
Author

hey.

no . i de like to calculate total time on minut that each organisation spent on each ticket using (activitydatetime).

for example (organisation) NORD spent 1 days 2 h in (ticket)  ER:1324309.

how do i calculate this. i based my calculation on row of (activitydatetime)

-->for ER:1324309:

1) first activity was on 01/05/2018 07:39:45  ,this activity made by (organisation) SUD

2) second activity was on 01/05/2018 07:41:01  ,this activity made by (organisation) SUD

3) spent time is (01/05/2018 07:41:01)-(01/05/2018 07:39:45)=0 day 0 h 1 min 16 sec

-->then  i calculate the time for organisation (NORD)

ultimatly i will store the time spent by each (organisation).

for example

-->for ticket ER:1324309:

SUD spent 0 day 1 h 5 min 16 sec

NORD spent 0 day 1 h 7 min 13 sec

hope i explained more. thanks

momofiore
Creator
Creator
Author

      Hey youssefbelloum i added a field that can help now.

(Activity) made by organization:

--> INITIALISATION: which (organization) started the (ticket)

-->TRANSFER TO : an (organization) send the ticket to an other organization

-->STATE CHANGEMENT: an oragnization made a chagement

-->SOLUTION: an (organization) close the ticket

please if somebody try to help me. ide like to know how long was the ticket in NORD as in SUD

TicketOpenDateResolveDateActivityActivityDateTimeOrganization
ER:129969422/03/201823/03/2018INITIALISATION22/03/2018 13:19:07NORD
ER:129969422/03/201823/03/2018TRANSFER TO22/03/2018 13:52:55NORD
ER:129969422/03/201823/03/2018STATE CHANGEMENT22/03/2018 13:53:03NORD
ER:129969422/03/201823/03/2018TRANSFER TO22/03/2018 14:13:12SUD
ER:129969422/03/201823/03/2018STATE CHANGEMENT22/03/2018 14:13:19SUD
ER:129969422/03/201823/03/2018TRANSFER TO22/03/2018 14:30:35SUD
ER:129969422/03/201823/03/2018STATE CHANGEMENT22/03/2018 14:31:43SUD
ER:129969422/03/201823/03/2018STATE CHANGEMENT22/03/2018 14:31:47SUD
ER:129969422/03/201823/03/2018STATE CHANGEMENT22/03/2018 14:46:44NORD
ER:129969422/03/201823/03/2018TRANSFER TO22/03/2018 14:46:44NORD
ER:129969422/03/201823/03/2018SOLUTION23/03/2018 09:35:26SUD
ER:129969422/03/201823/03/2018TRANSFER TO23/03/2018 09:35:47SUD
ER:128792903/03/201805/03/2018INITIALISATION03/03/2018 16:28:07NORD
ER:128792903/03/201805/03/2018STATE CHANGEMENT03/03/2018 16:37:18NORD
ER:128792903/03/201805/03/2018TRANSFER TO03/03/2018 16:37:18NORD
ER:128792903/03/201805/03/2018TRANSFER TO05/03/2018 07:55:23SUD
ER:128792903/03/201805/03/2018TRANSFER TO05/03/2018 08:32:01NORD
ER:128792903/03/201805/03/2018SOLUTION05/03/2018 14:32:23NORD
ER:128792903/03/201805/03/2018TRANSFER TO05/03/2018 14:32:59NORD