13 Replies Latest reply: Oct 31, 2017 10:38 AM by Sunny Talwar

# 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.

• ###### Re: Average Per day of Month

May be this

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

• ###### Re: Average Per day of Month

Sunny, don't you mean:

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

• ###### 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

• ###### 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 Jonathan's response is the right one I guess

• ###### 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?

• ###### Re: Average Per day of Month

Yes, Rolling 12 months. I am using the set Analysis below:

RangeSum(above(Aggr(Sum({\$<[DETAIL_TYPE] = {1,10}>}AMOUNT), POST_DATE),0,rowno()))

But it is giving me current month numbers, rather than averaging the last 12 months per day.

• ###### Re: Average Per day of Month

I would suggest to use  The As-Of Table to resolve this.... it will be efficient and easy to maintain

• ###### Re: Average Per day of Month

This would be the best way to look at the prior 12 months?

• ###### Re: Average Per day of Month

I would say the most efficient way to do it... other methods are going to be somewhat complex and will slow down the chart

• ###### 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

• ###### Re: Average Per day of Month

Maybe this

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

Regards

Pratyush