What's in this article?
- Learn how to use the Moving Average (Cumulative) function
- Step-by-step instructions
- Example of scenarios where the Moving Average function is useful
How to use the Moving Average (Cumulative) function
Moving Average (Cumulative) returns the moving averagefor all the data points given in
values. This function is used to smooth out data sets to help clarify trends. For example, if you had a Google Analytics data source that showed website visitors with a significant decrease each weekend, the Moving Average function will help provide a more consistent representation of the data.
What's the difference?
Moving Average Cumulative averages all values in the given data set.
To use the Moving Average (Cumulative) function
Note: These procedures assume you are in the Klip Editor.
- Select a component from the Component Tree.
- Click the Start Formula link in the formula editor.
- Click the Insert Function button on the formula editing toolbar.
- Select the
MA_CUMULATIVEfrom the Statistics category in the Function's menu.
- Click the
- Select a range of values from the data source.
To better understand how the moving average (simple) function works, consider this basic example.
MA_CUMULATIVE (7, 6, 3, 9, 5, 10, 2, 8, 1, 4)
The result would be as follows:
[7, 6.5, 5.33, 6.25, 6, 6.6, 5.8, 6.8, 5.2, 5)
Bar / Line Chart
The Moving Average (Cumulative) function is often used in a bar or line chart to smooth out data sets. Here is an example that shows the raw data (the red line) compared to data manipulated using the Moving Average (Simple) function (the blue line).