Skip to main content
Announcements
Discover what’s possible with embedded analytics! March 6, 10 AM ET SIGN UP!
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

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


@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