# Averaging

The averaging feature adds a moving average of the target value column to the dataset. Two new columns are added to the dataset whose names start with MA (Moving Average). MA12 is added by default, and the second column is configurable. The configuration sets up the moving average window size. This feature is a simple mathematical implementation.

#### Steps to configure averaging for a query:

1. Open a query page in edit query mode.
2. Select a meaningful time-series column and a value column.
3. Select the Averaging option from the operations selection box.
4. An averaging configuration box appears. This box contains a dropdown called ma window using which the window size of the moving average can be set. The bigger the window size the more curvilinear the graph becomes
5. Save the configuration and execute the query.
6. The resulting dataset contains two columns MA12 whose window size is 12 and another column with MA whose window is previously configured.

#### Steps to visualize averaging for a query:

1. Create a new visualization or open an already existing visualization in edit mode.
2. Select the chart type as a line for better visualization.
3. Select the time column as the X column and the value column as the Y column. Add the moving average columns i.e. columns with the prefix MA, into the Y column multi-selection box. A graph similar to the following picture must be rendered.

![](/files/ANr7PGf9pGhx4OKtjwHk)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/autonomous-insights/time-series-ai-ml/averaging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
