6 Replies Latest reply: Sep 13, 2014 4:41 AM by Manish Kachhia

# 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

• ###### Re: compare month prodution with average prodution

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

- Marcus

• ###### Re: compare month prodution with average prodution

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

• ###### Re: compare month prodution with average prodution

i think its this

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

thaks to all

• ###### Re: compare month prodution with average prodution

it should be

SUM({1}qty)

and

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

• ###### Re: compare month prodution with average prodution

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)

• ###### Re: compare month prodution with average prodution

Check enclosed file....