Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello everyone,
i have below table, i want to used AGGR function to calculate average.
i am not getting why both o/p shows differ value if they calculate average.
it become difficult for me to find a difference between them.
=avg(aggr(sum(sales),prod)) =avg(sales)
why it shows different o/p if they calculate average ?
please let me know
thank you..
If You want the average per sale when using aggr =avg(aggr(avg(sales),prod, code)) will get the average sale per sale (not just product) eg 304,16667 if that is what You want.
Read this blog: Average – Which average? It would be worth reading I guess.
Hi Prachi ,
try below One :
=Aggr(Avg(sales),prod)
Thanks,
Arvind Patil
=Sum( sales) / Count( distinct prod) it shows 365
but when i used code instead of prod then it show 304.16
it shows o/p when i clicked on field otherwise it shows blank
Hi Prachi,
Your total sales = 3650.
avg(sales) = your average per line = 3650 / 12 = 304.16666
avg(aggr(sum(sales),prod)) will give the average per prod = 3650 / 10 = 365.
Regards
Andrew
Hello Prachi,
Try this,
=avg(aggr(sum(sales),prod,code))
Your Avg(Sales) and avg(aggr(sum(sales),prod)) both are different first go for the AVG calculation and check the result
1. Avg(Sales) give different result try to put this all expression in the chart and see the result what they return back.
2. avg(aggr(sum(sales),prod)) is also different it is by Prod and if you use
avg(aggr(sum(sales),prod,code))
or
avg(aggr(sum(sales),code))
This all are also different so be aware about the AVG usage and output also.
ok but in the following exp why it doesn't take average per prod ,it shows 304.16 o/p
= Avg( Aggr( Sum(sales), prod,code ) )
but how i know which is correct or not