Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Average in aggregate function

Hi guys,

 

I am new to cliq sense and I am currently struggling with one formula.

I would like to calculate average number of expenses (ID) per grade of employee a per year quarter. I think the trouble is with the function agr - because if I switch it for max function for example it does calculate maximum number an employee in a particular grade posted per a particular quarter.

Could please anyone advise me what am I doing wrong??

aggr({<NAME_ANONYMISED=>} nodistinct avg(aggr({<NAME_ANONYMISED=>}nodistinct count(ID),NAME_ANONYMISED, [POST_DATE.autoCalendar.YearQuarter])), GRADE,[POST_DATE.autoCalendar.YearQuarter])

 

P.S.: the name anonymised is there in order to prevent qlik recalculating based on a name I select - this I would like to keep there. The average should not change with a filtered employee.

1 Reply
sunny_talwar

Averages can get a little tricky... check this out

Average - Which average?