Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
What is the difference between the below expressions?
1) =Avg(Aggr( Sum(Sells), Products ))
2)=Aggr( Sum(Sells), Products )
Table:
LOAD * INLINE [
Products,Sells
Product 1,10000
Product 2,60000
Product 3,70500
Product 4,45000
Product 5,50200
];
Hi,
You have only one record for each of the Product, if you have multiple records then you can see the difference.
Regards,
Jagan.
In this situation the AVG does not do much
As you already use AGGR to group you product AVG from this group will be the same as the AGGR.
and is the same as
=Avg(Sells)
Hi,
You have only one record for each of the Product, if you have multiple records then you can see the difference.
Regards,
Jagan.
Hi,
If you are using Product as dimension then there is no need of Aggr(), it should be used when there is no corresponding dimension used in the chart.
Below expressions also give the same result
1) =Avg(Sells)
2)=Sum(Sells)
Aggr() will have performance, so use it carefully whenever you need it really.
Regards,
jagan.