Announcements
cancel
Showing results for
Did you mean:
Not applicable

## Average over period sum

Hi, i have the following table for example

test:

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!

1 Solution

Accepted Solutions
MVP

Hi, try:

=Avg(Aggr(Sum(salesAmount), period))

4 Replies
MVP

Hi, try:

=Avg(Aggr(Sum(salesAmount), period))

Creator III

Hi Alexander,

simply use: Sum(salesAmount) / Count(DISTINCT period)

Hope this helps

Burkhard

Not applicable
Author

Thank you very much, it was i've been looking for.

Not applicable
Author

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!

Community Browser