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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregation Function

Hi All,

I had some an issue while using an aggregation function. There are 3 fieds in my table : marks,subject and teacher.

I am trying to make a bar chart where i can find the sum of average marks (average marks for each subject) for each teacher.The attached the qvw would illustrate my problem.

I used the expression sum(aggr(avg(Marks),Subject))  and Teacher as the dimension. However, I am getting erroneous results. Is there some way I can fix the problem ?

Thanks,

Neeraj

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I think you'll want to aggregate over the Teacher field as well:

=sum(aggr(avg(Marks),Subject, Teacher))

View solution in original post

2 Replies
Anonymous
Not applicable
Author

I think you'll want to aggregate over the Teacher field as well:

=sum(aggr(avg(Marks),Subject, Teacher))

Not applicable
Author

Thanks Johannes. Works fine

Regards,

Neeraj