Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr

Hi,

did I get it right: Aggr is used to do a "group by"
I"d like to sum(sales) "grouped by" the postal code.

Table contains:

Sales_Rep, Sales_Postal_Code, Sales_Amount

Thanks

3 Replies
Not applicable
Author

Yes, you're on the right track. Aggr allows you to group over a specific set of dimensions.

For your purpose, you may not need it. You could create a chart or table that uses postal code as the only dimension. Then create an expression for Sum(Sales_Amount) and you have sales by postal code.

If you want to create a table with Sales_Rep and postal code as dimensions, but have one of the fields be a postal code sales total, then you would use the Aggr function. Something like: aggr( sum(Sales_Amount), Sales_Postal_Code )

Not applicable
Author

Hi,

I think I need to use Aggr in my calculations, I currently rely on using the dimensions to generate my required grouping but there are a couple of numbers that are going astray.

Do you have a simple example of how this might work in a straight table or pivot?

Cheers

Lee

Not applicable
Author

Hi NMiller,

Could you please tell me what does this does then? It will group by which value? Country or Region? OR does it group by Country group by Region???

aggr( sum(Sales), Country, Region )


Please help me out!