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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dandaanilreddy
Partner - Creator III
Partner - Creator III

Total Avg of all quarters

Hello Qlik experts,

I have a pivot table in which i am calculating sum(value) for 9 quarters and sum(value) for each year. Now i want to calculate total avg(9 quarters) i tried by using agg function but its not working. Can someone help me please?

Thanks,

Subbu

1 Solution

Accepted Solutions
sunny_talwar

Try this

Avg(Aggr(Sum(value), Name, Quarter))

View solution in original post

6 Replies
sunny_talwar

What was the expression? Dimensions? Can you share sample or images?

dandaanilreddy
Partner - Creator III
Partner - Creator III
Author

Hi Bro

I am using the below fields in the pivot.

Name,quarter and year as dimensions and sum(value) as measure. I want to create a new column which shows the total average of all quarters i.e 9 quarters.

Thanks

Anil

sunny_talwar

Have you tried using Avg(Aggr(Sum(value), Name, Year, Quarter)) and then enable partial sum for Year field

dandaanilreddy
Partner - Creator III
Partner - Creator III
Author

My mistake i dont have year field in my script so i created a new dimension from quarter id by taking left(quarter,4) which converts the quarters to year. so now i have three dimensions i.e name, quarter and left(quarter,4) and one measure sum(values). Now i want to create a new column which calculates the total avg of 9 quarters. I tried the

Avg(Aggr(Sum(value), Name, left(quarter,4), Quarter)) but its showing blank values.


Thanks

Subbu

sunny_talwar

Try this

Avg(Aggr(Sum(value), Name, Quarter))

dandaanilreddy
Partner - Creator III
Partner - Creator III
Author

Thanks bro it worked