Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i have the following table for example
test:
load * inline [
period, branch, salesAmount
201401, 1 , 1000
201402, 2 , 1200
201312, 1 , 1400
201312, 2 , 1000
201311, 1 , 800
201402, 1 , 1050
];
i wish to calculate average of period sum sales amount. i'm looking for some examples and i've found Aggr(Total ...) function, but i don't understand totally how it works.
In this case it should be 1612,5
thanks!
Hi, try:
=Avg(Aggr(Sum(salesAmount), period))
Hi Alexander,
simply use: Sum(salesAmount) / Count(DISTINCT period)
Hope this helps
Burkhard
Thank you very much, it was i've been looking for.
Thanks Burkhard, but my real expresion is so complex and Aggr is more simple for read, this data was only to show you that i want to make.
Regards!