9 Replies Latest reply: Jan 14, 2016 4:10 AM by jagan mohan rao appala

# Average value / Month

Dear Master QS,

I have a question about How we AVERAGE value / Month ?

Ex :  1. Sales In April 15, Mei 15, July 15      AVG = ?

2. Sales In April 14, April 15, April 16    AVG = ?

Regards

• ###### Re: Average value / Month

Hi,

Try like this

=Sum({<MonthYear={'April 15', 'May 15', 'July 15'}>} Sales)/3

=Sum({<MonthYear={'April 14', 'April 15', 'April 15'}>} Sales)/3

Hope this helps you.

Regards,

Jagan.

• ###### Re: Average value / Month

Hi, Jagan

Thanks for respon,

It doest work, month  wearing date format (yyyy/mm/dd) that is devided into month and year.

`date`,

year(date) as Year,

Month(date) as Month,

• ###### Re: Average value / Month

Create one more field at script like:

`date`,

year(date) as Year,

Month(date) as Month,

MonthName(date)  as MonthYear,

then Use expression suggested by Jagan.

Make sure format of MonthName(date)  as MonthYear should be same as per defined values in expression like {'April 15', 'May 15', 'July 15'}

• ###### Re: Average value / Month

Hi Mrdee,

Try this function:

avg(aggr(sum(value),Month))

Thanks and Regards,

Sangram Reddy.

• ###### Re: Average value / Month

Hi,

Attach sample file so that it is easier to understand your data format.

Regards,

Jagan.

• ###### Re: Average value / Month

try

avg(aggr(sum(value),Year,Month))

• ###### Re: Average value / Month

Thanks All,

The problem is solved.

Regards,

• ###### Re: Average value / Month

Hi,

Regards,

jagan.

• ###### Re: Average value / Month

Hi,

Close the thread by giving Correct Answer, so that it will be helpful for others to easily find the solution.