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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
fginfrida
Partner - Contributor III
Partner - Contributor III

The Average Function (Chart) result differs from the average (total) on a straight table

I have a data set that shows, by assignee, the date that a service request was placed in a work queue.  The table shows all the items in the queue, selectable by assignee.  I've configured the table to return average number of backlog days:

fginfrida_0-1593541037502.png

Where the column Backlog Days is forced to be a measure by setting equal to Avg(Backlog_Day_Number). The query that generates a data set for this application returns a value for backlog days which is calculated excluding all non-working days.

The value of 8.9 for the particular assignee is correct - a total of 62 backlog days for 7 service requests.  Well and good.

However, when I try to compute the backlog elsewhere in the application, either with the formula

         Aggr(Avg(Backlog_Day_Number),Assignee) 

Or with a simple 

        Avg(Backlog_Day_Number) with a selection of "Charles Burrell"

the application returns 11.17.

Clearly I'm failing to understand something about the Avg. Function (and why it differs from selecting a Total with a type of Avg).  Can anyone shed light on this?

Thanks,

Frank Ginfrida

Labels (3)
1 Solution

Accepted Solutions
fginfrida
Partner - Contributor III
Partner - Contributor III
Author

Thank you.  That provided a correct answer.

I'm still not clear on the rationale for the result. I'll have to dig deeper into the AVG function and how it operates.

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

How about this?

Avg(Aggr(
    Avg(Backlog_Day_Number)
, Assignee, [SR No.]))

 

fginfrida
Partner - Contributor III
Partner - Contributor III
Author

Thank you.  That provided a correct answer.

I'm still not clear on the rationale for the result. I'll have to dig deeper into the AVG function and how it operates.