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

First calculate durance, then count instances related

Hi.

I'm on my first prosject after Designer Training, and I have a challenge I'm strugling with.

I have a table that looks something like this:

CriticalityStartDateEndDate
Critical21.01.2012 12:0021.01.2012 14:00
Critical22.01.2012 08:0023.01.2012 15:00
Average21.01.2012 09:0027.01.2012 13:00
Low21.01.2012 09:00

It's an SLA dashboard I'm making and I want to first calculate the number of hours the incident where active, I've managed to do that in a list with:

=Interval([Close Time]-[Open Time],'hh')

But what I really need to report on is a sum of "critical" events that lasted more than for example 24 hours.

I'm thinking that I might want to have a new row in my table called "durance"?

2 Replies
Not applicable
Author

OK, I've managed to create a table row called Duration by adding this to my script:

Durations:

Left Join (Table) Load

    [IncidentID],

    if([IncidentStatus]='closed', interval([EndTime]-[StartTime],'hh')) as [DurationTime]

Resident Table;

Next Challenge:

How do I report a sum of "critical" events that has a DurationTime more than for example 24 hours.

I would like a table or chart saying:

Critical violations: 1

Average violation: 2

Not applicable
Author

I've figured it out.

I'll post an explanation on request if anyone is interested.