AGGR() is a chart function, that is defined as a measure in chart objects and not used in the app’s load script. AGGR() is used in advanced calculations combined with other aggregation functions where you need to make a second aggregation based on the result of the first. Watch this video and see these resources to learn more:
https://community.qlik.com/docs/DOC-3857 - Technical Brief
https://community.qlik.com/blogs/qlik...
https://community.qlik.com/blogs/qlik...