Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

aggr function why we used in chart? what purpose it is useful? single line

aggr function why we used in chart? what purpose it is useful? single line

3 Replies
robert99
Specialist III
Specialist III

It is a difficult function to understand

QlikView Technical Brief - AGGR.docx

I used it when I tried everything else and could not get an expression to work. Unless I transferred data to Excel and reloaded. I turned to the forum for help

Expression / (count(total<site,VDate> Part)) / drill down issues etc

But there are simpler examples. But in effect aggr creates a temporary table (like transferring to excel and reloading)

But I would have never understood aggr until I needed to use it

Not applicable
Author

Usage of AGGR function in qlikview:

• To create a calculated dimension and perform a nested aggregation

eg: Aggr(Count(DISTINCT [City]), [Country])

• To perform additional aggregations based on the resulting set of values

eg :=Max(Aggr(Count(DISTINCT [City]), [Country]))

Not applicable
Author

mostly used in calculated dimensions.

for e.g. top 5 products based on some arbitrary measure which may not necessarily part of your chart.

e.g. Your chart might have Product as the dimension and Sum(Orders) as the Expression. But you wan to display the top 10 products based on "Sales" and NOT on "Orders".

Then you write like this.

Aggr(if (rank(Sum(Sales)) <=10, Product), Product)

fyi, If we were to top do top the top 10 based on Orders in this example, we could have had a normal dimension and then used the Dimension Limits.