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

Torubles on calculating average resolution time

Hi,

I am trying to create a simple pivot table to calculate the average resolution time of all closed incidents but I'm not getting the expected results.


I have a table with the following fields:

Incident Code

Date Closed (its null when it has not been closed yet)

Date opened

What I'm doing is to create a pivot table where I put as a dimention the "Incident Code" and I create the follwing Expression [Date closed] - [Date opened] and I call it Time for closing.

The result that I get would be the following as an example

Incident Code     Time for closing

1                         2,3

2                         1,2

3                         4,6

4                         -

5                         -

6                         3,2

My problem is that what I want to get is the average of all the incidents that have been closed. The problem is that when I put the dimention out it does not calculate. I've tried the following expretions but none of them is giving me good results:

1.  avg([Date closed] - [Date opened]

2. (if(isnull([Date Closed]) or IsNull([Date Opened]),0,1)*([Date Closed]-[Date Opened])) / (Count(Incident Code)- count(isnull(Date Closed) or isnull(Date Opened))

and other expressions but I'm getting nowhere. Does anybody know how should I proceed? Thanks in advance.

0 Replies