Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dmac1971
Creator III
Creator III

Stumped By Average Expression?

OK I have the following Expression :

=Avg({< CURR_STATUS = {'CLOSED'} >}  AGEDAYS )

To show the average age of closed tickets in a chart.  AGEDAYS is Today() - Closedate, but the chart is showing the average as 54Hrs,  and if background table extracted into Excel and the average hours checked the figure is correct, 7.8 Hrs.

What am I missing here?

1 Solution

Accepted Solutions
sunny_talwar

Do you want to find the difference between Today() and Closed Date or Closed Date and Open Date? In you Excel file you seem to be calculating the difference between Closed and Open.

Best,

S

View solution in original post

5 Replies
robert_mika
Master III
Master III

I have had situation where Data in Excel where wrong formatted giving different answers in Qlikview.

Could you attached your Excel file?

rubenmarin

Hi Dermot, can you double-check Qv and Excel are doing the same operations.

The AGEDAYS field will load how much time has passed since the ticket was closed. Is Excel doing the same or it has his "AGEDAYS" already calculated?

dmac1971
Creator III
Creator III
Author


Sorry if I extract the table out to Excel and then average the col its giving the right answer, QV is getting a wildly different answer!

Example data for Dec showing open and close dates, and number days taken attached.

Sample from Load Script to create close days :

Ceil(Today()-CREATEDDATE,1) As AGEDAYS


Thanks for help!!

sunny_talwar

Do you want to find the difference between Today() and Closed Date or Closed Date and Open Date? In you Excel file you seem to be calculating the difference between Closed and Open.

Best,

S

dmac1971
Creator III
Creator III
Author

Doh, as we call it here I've had a moment.....  Now fixed.  Thanks it was my own fault!!!!!