topic Re: Finding the average in Anaplan Platform https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105904#M25227

neg177_0-1619039666980.png

 

Wed, 21 Apr 2021 21:14:35 GMT neg177 2021-04-21T21:14:35Z Finding the average https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105899#M25224

Hi,

 

Need help creating a formula that pick's up the moving average for a number within 6 business days. 

Example) The amount for a line item over the past Weekdays were 1, 4, 6, 8, 9. I want to forecast this by finding the average of those days. 

 

 

Thank you

结婚,2021年4月21日20:49:20格林尼治时间 https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105899#M25224 neg177 2021-04-21T20:49:20Z
再保险:Finding the average https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105900#M25225

Have you tried using MOVINGSUM? Contrary to the name, it can also be used to calculate the moving average if you indicate the aggregation method.

 

You can see more on the formula here: MOVINGSUM 

Wed, 21 Apr 2021 20:57:47 GMT https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105900#M25225 chenjack.sonos 2021-04-21T20:57:47Z
再保险:Finding the average https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105901#M25226

Yes, we are using the Moving sum, but not getting back the correct average, I believe because it is picking up weekends (which we don't want it to do). This is the current formula we are using...

 

MOVINGSUM('Y03 Securitization (Actuals)'.Portfolio Factor Rate, -5, 0, AVERAGE)

 

we are trying to pick up the previous M, T, W, Th, F 

Wed, 21 Apr 2021 21:12:32 GMT https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105901#M25226 neg177 2021-04-21T21:12:32Z
再保险:Finding the average https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105904#M25227

neg177_0-1619039666980.png

 

Wed, 21 Apr 2021 21:14:35 GMT https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105904#M25227 neg177 2021-04-21T21:14:35Z
再保险:Finding the average https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105908#M25229

Hello  ,

 

You could achieve it still using the movingsum. But do not use the parameter Average.

 

Sum and divide by the count.

 

Using if condition, sum only the weekdays (skip the weekends).

XX-Y03 Securitization (Actuals) = if weekend then 0 else Y03 Securitization (Actuals)

 

For eg, if the current day is monday, your moving sum should be

Average = MOVINGSUM('XX-Y03 Securitization (Actuals)'.Portfolio Factor Rate, -6, 0, SUM) / 6

 

But you divide it by 6, so you will skip the weekend and calculate your average.

 

Hope it helps. 

 

Thanks

Arun

Thu, 22 Apr 2021 01:37:09 GMT https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105908#M25229 ArunManickam 2021-04-22T01:37:09Z
再保险:Finding the average https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105926#M25239

 

The trick her is to manipulate the value for the days so that you replace the weekend value with the first two values of the moving 5 day average.

Therefore, as the moving average progresses the function includes the weekends but the values for Tues and Weds are posted forward into Sat and Sun so they are included in the movingsum.

ChrisHeathcote_0-1619079740823.png

 

Create a new line which I have called, 'Movingsum Value', and using WEEKDAYS to distinguish which day of the week post forward 4 days if the weekday is 6 or 7. This has the effect of replacing Sat and Sun with the values from Tue and Wed.

You can then use the MOVINGSUM function as standard to calculate a moving average.

ChrisHeathcote_1-1619079905049.png

 

Thu, 22 Apr 2021 08:25:56 GMT https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/105926#M25239 ChrisAHeathcote 2021-04-22T08:25:56Z
再保险:Finding the average https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/106193#M25307

Hi,

 

Thank you it worked out great. 

 

 

Fri, 23 Apr 2021 21:55:22 GMT https://community.anaplan.com/t5/Anaplan-Platform/Finding-the-average/m-p/106193#M25307 neg177 2021 - 04 - 23 - t21:55:22z