topic Re: How to get moving standard deviation in Anaplan Platform https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124821#M31467

Thank you.

Moving average calculation is OK, but the goal is to calculate moving standard deviation.

I continue to consider how to calculate.

Sun, 14 Nov 2021 08:26:59 GMT Naoto 2021-11-14T08:26:59Z How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124318#M31306

Is there any ways to calculate moving standard deviation?
I want to calculate standard deviation in each time period based on moving period.
*not fixed period, period is determined by user's input.

 

In Anaplan there is no function to calculate standard deviation like Excel's "=STEDEV.P()",
so I try to calculate it using multiple line items.

 

Line items for
A : Moving Average calculation of Figure
B : Figure - Average
C : B^2
D : Moving Average calculation of C
E : Square root of D

 

To calculate one period of standard deviation is OK with above Line items,
however to calculate other time periods' standard deviation, these line item are not enough,
because only one "Average" can be used for one standard deviation calculation.

Is there any ideas to calculate standard deviation in each time period?

Tue, 09 Nov 2021 08:55:05 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124318#M31306 Naoto 2021-11-09T08:55:05Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124343#M31317

 

Use MOVINGSUM function to calculate the moving average across a stated time range where the calculation is carried out in a module contain time. 

 

Use TIMESUM when the calculation is not carried out in a module containing time. 

Both functions will allow you to calculate the mean average. 

 

Tue, 09 Nov 2021 10:22:42 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124343#M31317 ChrisAHeathcote 2021-11-09T10:22:42Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124344#M31318

Hi  

 

You are right, there is no direct function for Standard Deviation in Anaplan. If you are using a timescale and have a current period setup in time settings, use TIMESUM with aggregation method set to AVERAGE. This should help you get a rolling average value. 

 

Check out the TIMESUM Aggregation here 

Tue, 09 Nov 2021 10:24:46 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124344#M31318 ankit_cheeni 2021-11-09T10:24:46Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124349#M31320

  

Thank you for your comment.

 

I still don't have image for solution...

Please see attached image.

I think even using TIMESUM or MOVINGSUM, I can use only "an Average figure".

In my idea, to calculate W12's standard deviation, average figure as of W12 is used for each time period.

However to calculate W11's standard deviation, average figure as of W11 has to be used.

I have to use different "Average figure" in each time period.

 

Do you have any ideas for this?

Tue, 09 Nov 2021 13:03:16 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124349#M31320 Naoto 2021-11-09T13:03:16Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124354#M31323

  

 

Please don't use TimeSum() in a module that is dimensionalized by time as it has performance issues:  https://community.anaplan.com/t5/Anaplan-Live-December-2020/Function-vs-Function-MOVINGSUM-vs-TIMESUM/td-p/93488

 

Thanks,

 

Rob

Tue, 09 Nov 2021 13:25:21 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124354#M31323 rob_marshall 2021-11-09T13:25:21Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124355#M31324

 

Use MOVINGSUM within the calculation module dimensioned by time.

Set up a time settings module dimensioned by week. 

Add a new line item called, 'Count'. Format as number. Use the following formula =1. Set summary settings to SUM.

 

Add a new line item called, 'Cumulative'. Format as number. Use the following formula =IF 1+PREVIOUS(Cumulative)<=YEARVALUE(Count) THEN 1+PREVIOUS(Cumulative) ELSE 0

 

In your MOVINGSUM line item use the following formula =MOVINGSUM(Data to Average,-TimeSettings.Cumulative,0,AVERAGE)

 

This will calculate the YTD mean average of the 'Data to Average' line item in your calculation module. 

This can then be used in your stand deviation calculation.

 

Wed, 10 Nov 2021 14:01:38 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124355#M31324 ChrisAHeathcote 2021-11-10T14:01:38Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124443#M31355 Hi Rob
Thanks so much! I see how recklessly inefficient TIMESUM could've been. One learns something everyday eh! Thanks again
Wed, 10 Nov 2021 08:11:07 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124443#M31355 ankit_cheeni 2021-11-10T08:11:07Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124453#M31360 I realised there was an error so I updated the suggest formula. 结婚,2021年11月10 09:25:28格林尼治时间 https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124453#M31360 ChrisAHeathcote 2021-11-10T09:25:28Z Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124486#M31373

 

 

It is a very common mistake and often overlooked, but can be very costly.  And that is the point, to learn something new every day?

 

Rob

Wed, 10 Nov 2021 13:59:34 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124486#M31373 rob_marshall 2021-11-10T13:59:34Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124812#M31461 < P > < LI-USER uid = " 19172 " > < / LI-USER >, < / P > < P >那nk you very much! I understand moving average calculation.

I try to make standard deviation calculation  based on user's input period setting.

 

example1 user input=3weeks

Week 5's standard deviation is calculated based on figure on Week 3, Week 4 and Week 5

Week 4's standard deviation is calculated based on figure on Week 2, Week 3 and Week 4

 

example2 user input=4weeks

Week 5's standard deviation is calculated based on figure on Week 2, Week 3, Week 4 and Week 5

Week 4's standard deviation is calculated based on figure on Week 1, Week 2, Week 3 and Week 4

 

if user's input count of weeks is limited, I think I can write formula with many IF-THEN-ELSE.

However I want try to set calculation with no limit of count of weeks.

Do you have any ideas for this?

But I want function Do you think it is possible to c

 

坐,13 Nov 2021 12:14:28 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124812#M31461 Naoto 2021-11-13T12:14:28Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124813#M31462

Try replacing the start period in the MOVINGSUM with-the user input.

Example; user selects 3.

=MOVINGSUM( Value, -UserInput, 0, AVERAGE )

坐,13 Nov 2021 13:42:22 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124813#M31462 ChrisAHeathcote 2021-11-13T13:42:22Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124821#M31467

Thank you.

Moving average calculation is OK, but the goal is to calculate moving standard deviation.

I continue to consider how to calculate.

Sun, 14 Nov 2021 08:26:59 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124821#M31467 Naoto 2021-11-14T08:26:59Z
Re: How to get moving standard deviation https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124822#M31468 You need to calculate over a series of line items as suggested in your original post. Sun, 14 Nov 2021 09:43:56 GMT https://community.anaplan.com/t5/Anaplan-Platform/How-to-get-moving-standard-deviation/m-p/124822#M31468 ChrisAHeathcote 2021-11-14T09:43:56Z