Skip to main content

# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Search instead for
Did you mean:
Creator

## Question about AGGR

hi all

I know there are tons of posts about AGGR but I cant seem to understand it.. or how it ends up truly working..

I guess im trying to see if someone can help explain it in a more simplified manner maybe..

like why use aggr... what other type of commands are there besides AGGR...

the difference between  AGGR(sum(blah blah)  vs   SUM(AGGR(Sum(blah blah)

how it affects or not affects showing subtotals..

maybe some examples with simple math.. that can make it easy to understand..

sorry this makes my head spin

thanks all

1 Solution

Accepted Solutions
Partner - Creator III

Hi Jackie,

If you're familiar with SQL, you can consider AGGR function as an analog to GROUP BY statement.:

Select

Customer_ID,

Location,

SUM(Amount)

From Table1

Group By

Customer_ID,

Location

Analog to AGGR(sum(Amount) ,  Customer_ID, Location) .

This expression returns the list of SUMs

Now, you may need to aggregate the  list of SUMs above and to use it in the chart

Avg( AGGR(sum( Amount) ,  Customer_ID, Location))

Or you need the most successful customer:

Max(AGGR( sum( Amount) ,  Customer_ID, Location))

Hope it will help

1 Reply
Partner - Creator III

Hi Jackie,

If you're familiar with SQL, you can consider AGGR function as an analog to GROUP BY statement.:

Select

Customer_ID,

Location,

SUM(Amount)

From Table1

Group By

Customer_ID,

Location

Analog to AGGR(sum(Amount) ,  Customer_ID, Location) .

This expression returns the list of SUMs

Now, you may need to aggregate the  list of SUMs above and to use it in the chart

Avg( AGGR(sum( Amount) ,  Customer_ID, Location))

Or you need the most successful customer:

Max(AGGR( sum( Amount) ,  Customer_ID, Location))

Hope it will help

Community Browser