Calculates the moving correlation coefficient between two columns within a specified window of rows relative to the current row.
Category: window
Syntax:
Returns: Float
Context Filtering: ✓ Yes
Parameters
Allowed Column Types for column1: INT, FLOAT, DECIMAL, NUMBER
Allowed Column Types for column2: INT, FLOAT, DECIMAL, NUMBER
Validation
- Minimum parameters: 3
- Maximum parameters: 4
Examples
Returns the 7-day moving correlation between sales and marketing spend (current row and 6 previous rows).
Calculates a 30-day moving correlation between temperature and ice cream sales, useful for tracking how the relationship changes over time.
Calculates a 20-day rolling correlation between two stocks for analyzing their relationship.
- CumulativeCorr - Calculates cumulative correlation from the first row
- Corr - Returns the overall correlation
- MovingAvg - Calculates moving average with a window
Last modified on March 13, 2026