CumulativeCorr

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

You can use the CumulativeCorr function on BigQuery,ย PostgreSQL, and AlloyDBย connections.

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.

๐Ÿ“˜

This function is not currently supported on Snowflake or Redshift connections.


Related resources