Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
kroberts13
New Contributor III

Average Per day of Month

Hello,

I am looking for a way to get an average amount per day of the month over the last 12 months. For example, I would need to sum the amount on 12/1, 1/1, 2/1, etc. and average that number. I would need to do that for every day. Any help on this would be greatly appreciated.

Thanks in advance!

13 Replies

Re: Average Per day of Month

May be this

Sum(Aggr(Avg(Value), Date))

MVP
MVP

Re: Average Per day of Month

Sunny, don't you mean:

Avg(Aggr(Sum(Value), Date))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

Re: Average Per day of Month

Not sure I am clear if OP wants to do Avg each day and then sum or sum each day and then average.... but you could be right

kroberts13
New Contributor III

Re: Average Per day of Month

I would want to sum every day (12/1, 1/1, 2/1) and then average

Re: Average Per day of Month

Then jontydkpi‌'s response is the right one I guess

effinty2112
Honored Contributor

Re: Average Per day of Month

Hi Kyle,

try a straight table with calculated dimension

=Day(Date)

and expression

avg(Aggr(Sum(Amount),Date))

Good luck

Andrew

prat1507
Valued Contributor

Re: Average Per day of Month

Maybe this

=avg(Aggr(Sum(Amount),YearField,MonthField))

Regards

Pratyush

kroberts13
New Contributor III

Re: Average Per day of Month

How would I just grab the last 12 months?

Re: Average Per day of Month

Are you trying to get rolling 12 months?

Community Browser