Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I always have this doubt about why to use Aggr(which is group by in sql) in straight table and pivot table.
As far as i know the straight table or pivot table will group the expression result(say, sum(sales)) automatically based on the dimension used.
So ultimately, the row in the straight/pivot table will have the aggregated value beside its corresponding dimension.
So why to use aggr?
You are absolutely right. Aggr() should usually NOT be used.
However, if you want a nested aggregation, then you should use Aggr(), e.g.
Average of (Sum of sales per Month) = Avg(Aggr(Sum(Sales),Month))
HIC
See also
http://community.qlik.com/blogs/qlikviewdesignblog/2014/05/19/function-classes
Aggr can aggregate values on dimension different from the one used in the chart ...
You are absolutely right. Aggr() should usually NOT be used.
However, if you want a nested aggregation, then you should use Aggr(), e.g.
Average of (Sum of sales per Month) = Avg(Aggr(Sum(Sales),Month))
HIC
See also
http://community.qlik.com/blogs/qlikviewdesignblog/2014/05/19/function-classes
Thanks!!..you guys cleared my doubt.