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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of total Difference


Hi all ,

I have some data in below formate.

Ticket NumberPending Start DatePending End Date
44442/8/2012 12:122/10/2012 12:12
2/10/2012 12:222/14/2012 12:26
2/14/2012 15:582/14/2012 20:23
2/14/2012 20:242/16/2012 20:24
33332/17/2012 16:252/21/2012 4:36
2/21/2012 4:382/23/2012 4:39
2/23/2012 4:442/24/2012 1:44

What I need is to find is, the total time (in minute) for which the ticket was in Pending.

Thanks,

D J

3 Replies
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

The expression would be something like this:

sum([Pending End Date] - [Pending Start Date]) / 24 / 60

That could then be placed in a chart with the Ticket Number as the dimension.

It would be slightly more efficient if you add Pending Duration as a new field into your load script and then just do:

sum([Pending Duration])

But there is not going to be too much in it performance wise.

Cheers,

Steve

Not applicable
Author

To calculate the difference use Interval

Interval(Pending End Date - Pending Start Date, 'mm') you will get the minutes and then total that minutes

Thanks

selva

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Selva,

Would a sum around that function not turn it back into portions of a day?  You would need to do the sum inside the interval to get the correct value:

=interval(sum([Pending End Date] - [Pending Start Date]), 'mm')

- Steve