Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

compare month prodution with average prodution

hi, this is my firt post and this is my first project

i have this table

   

this one i can create

but i can't create this one

the total is calculated by adding the total of each january (4+6+6)

and the avarege is the avarege of (4,6,6) i.e in this case (4+6+6)/3

can anyone help me.

thaks

6 Replies
marcus_sommer

Try this: avg(aggr(sum(qty), year))

- Marcus

ecolomer
Master II
Master II

Your formula for calculate average are wrong

you can use:

Sum(total) / count(distinct year) 

or

Sum(qty) / count(distinct year)

or

avg(aggr(sum(qty), year)

MK_QSL
MVP
MVP

Check enclosed file....

Not applicable
Author

i only have to add the month

avg(aggr(sum(qty), year, month))

the average its ok, but it returns the average of my selection, i want the average of all the data.

thanks

Not applicable
Author

i think its this

avg({1}aggr({1}sum({1}qty)), year, month))

thaks to all

MK_QSL
MVP
MVP

it should be

SUM({1}qty)

and

Avg({1}Aggr(SUM({1}qty),Year))