# CumulativeCorr

The **CumulativeCorr** function calculates the correlation coefficient of the input column up to and including the current value.

### Syntax

```
CumulativeCorr([Column 1], [Column 2])
```

Function Arguments:

* **\[Column 1]** (required) - The column representing the dependent data.
* **\[Column 2]** (required) - The column representing the independent data.

> ### 📘
>
> Cumulative functions depend on the order of the given column. If you change the sorting you will change the result.

### Example

```
CumulativeCorr([Weekly Cost], [Weekly Revenue])
```

A table contains the weekly revenue of a store and the total amount spent by that store that week.  The **CumulativeCorr** function can be used to find the correlation coefficient up to and including each row value.

<figure><img src="https://files.readme.io/d33b12a-mmm.png" alt=""><figcaption></figcaption></figure>


---

# 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://support.meetuma.ai/uma-knowledgebase/data-and-reporting/analytics-pro/functions/window-functions/cumulativecorr.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.
