Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
danielreber
Contributor II
Contributor II

Monthly Average With Detail Data

I have data at the day level but I would like to create an expression that calculates the monthly average for the last six months. I am currently using

=num(avg({< _M={13,12,11,10,9,8} >}total TransactionAMT*-1),'$#,##0')

with "_M" being the month number field and 8-13 being the last six months.  However, the calculation is averaging the data at the day level.  How do I calculate a monthly average for the last six months?

Thanks

Dan

Labels (1)
2 Replies
danielreber
Contributor II
Contributor II
Author

 I believe I figured it out using 

=num(avg({< _M={13,12,11,10,9,8} >} aggr(sum(TransactionAMT*-1),_M)),'$#,##0')

Is this correct?

sunny_talwar
MVP
MVP


@danielreber wrote:

 I believe I figured it out using 

=num(avg({< _M={13,12,11,10,9,8} >} aggr(sum(TransactionAMT*-1),_M)),'$#,##0')

Is this correct?


Looks correct to me