Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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