Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

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

9 Replies
MVP
MVP

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.

Not applicable

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,

balrajahlawat
Esteemed Contributor

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'}

reddys310
Honored Contributor II

Re: Average value / Month

Hi Mrdee,

Try this function:

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

Thanks and Regards,

Sangram Reddy.

MVP
MVP

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))

Not applicable

Re: Average value / Month

Thanks All,

The problem is solved.

Regards,

MVP
MVP

Re: Average value / Month

Hi,

If you got the answer close this thread by giving Correct and Helpful answers this helps others in finding the answers.

Regards,

jagan.

MVP
MVP

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.

Regadrs,

jagan.