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

How to use Aggregation at script level

Can anybody tell how to use How to use Aggregation at script level

Thanks

4 Replies
anbu1984
Master III
Master III

Do you mean using Aggr() ?

Not applicable
Author

Yes Cheliyan,

In Designing we can write avg(aggr(sum(sales),Country)), like this.

similar way i should do the same in the script level

Thanks

anbu1984
Master III
Master III

You cannot use Aggr() in script. You can try like this

Initial:

Load * Inline [

Country,Sales,Year

India,1000,2013

India,2000,2014

China,1000,2013

China,200,2014 ];

Join(Initial)

Load Country,Sum(Sales)/Count(Country) As Avg Resident Initial Group by Country;

MarcoWedel

Hi,

there are multiple aggregation functions for the script, they all have in common that there must be a group by clause for all fields loaded but not aggregated:

QlikCommunity_Thread_136007_Pic2.JPG.jpg

hope this helps

regards

Marco