-
FlexPro
- At a Glance
- Features & Options
- Applications
- All Advantages
- What’s New in FlexPro 2021
- Try FlexPro For Free
- FlexPro View OEM Freeware
- Buying Guide
- Login
- Language
-
-
-
- +49 6894 929600
- infoweisang.com
- Google Maps
- Products
- News
- Support
- Company
- Contact
- Login
- Language
-
-
-
- +49 6894 929600
- infoweisang.com
- Google Maps
Home > Community > Automation and VBA > Speeding up running average calculations > Reply To: Speeding up running average calculations
![norbert.bakkers@lr.org](https://www.weisang.com/wp-content/uploads/2016/09/default_avatar.jpg)
During execution of a programme, the running average of a dataset seems to take a very long time to calculate.
I first tried to get the code to program a running average by recording a macro and to use it in a modified form in my own code. The problem is that I can record it but I can not execute the macro. It crashes on the line that sets the ‘Interval width’ => ‘WindowSize’.
This is the recorded macro:
ActiveDatabase.ActiveFolder.Object(“Mean”).Select False
ActiveDatabase.ActiveFolder.Object(“Mean”).Select
ActiveDatabase.SelectedObject.WindowSize = 500
Application.UpdateAll
Therefore I use the following formula:
.Formula = “Mean(‘DataSet’ ,MEAN_ARITHMETIC + CALC_RUNNING, 500)”
This works but is very slow for bigger datasets, especially if the averaging window is big. Is there any way of speeding up this process?