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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Aggr function not working

Dear all

They are 4 students taking English exam in 2012, I would like to show the exam result for Student A and Others (average of the class) .

I managed to show no. of students = 4 in Expression and result for Student A (89).

However :
1. I have problem to show 4 students in Dimension using Aggr function (1 now should be 4).
2. I have problem to compute average for the class (4 students).

Thank you

Tracy

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

#Students in Dimension: Aggr(Count( {<Name=>} Seq) , Year, Subject )

#Students in Expression: Count(TOTAL <Year,Subject> {1} Seq)

Others in Expression: Avg( {<Name=>} Data)

ALL should be avoided and is equivalent to TOTAL {1}. Qlik points out that ALL is deprecated and might be removed as a valid keyword in any new release of QlikView.

View solution in original post

6 Replies
sunny_talwar

I am working with Personal edition of QlikView, would you be able to share the dimension and expression information you havein your application right now?

hic
Former Employee
Former Employee

Why do you have "# of Students" as dimension? I can understand that you want number of students as measure - but as dimension? You want the numbers per Year and Subject and these should be your dimensions.

If you still want it as dimension, you should add a total qualifier in the aggregation, e.g.  count({1} total <Name>)

Finally, I suggest you don't use the all qualifier in your expression. It is a legacy function that we will remove in coming versions. Use count({1} total <Name> Seq) instead.

HIC

petter
Partner - Champion III
Partner - Champion III

#Students in Dimension: Aggr(Count( {<Name=>} Seq) , Year, Subject )

#Students in Expression: Count(TOTAL <Year,Subject> {1} Seq)

Others in Expression: Avg( {<Name=>} Data)

ALL should be avoided and is equivalent to TOTAL {1}. Qlik points out that ALL is deprecated and might be removed as a valid keyword in any new release of QlikView.

tracycrown
Creator III
Creator III
Author

Dear Petter

Many thanks for your clear advice with examples.

Can you kindly explain what is {1} and the purpose in the 2nd statement ?.

Tracy

sunny_talwar

{1} is used when you don't want your expression to change based on any selection you make in your application.

tracycrown
Creator III
Creator III
Author

Dear Sunny

Thanks for your quick response.

Tracy