Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
jagan
Luminary Alumni
Luminary Alumni

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
Author

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,

Anonymous
Not applicable
Author

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

reddy-s
Master II
Master II

Hi Mrdee,

Try this function:

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

Thanks and Regards,

Sangram Reddy.

jagan
Luminary Alumni
Luminary Alumni

Hi,

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

Regards,

Jagan.

Kushal_Chawda

try

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

Not applicable
Author

Thanks All,

The problem is solved.

Regards,

jagan
Luminary Alumni
Luminary Alumni

Hi,

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

Regards,

jagan.

jagan
Luminary Alumni
Luminary Alumni

Hi,

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

Regadrs,

jagan.