Calculates the moving variance of values within a specified window of rows relative to the current row.
Category: window
Syntax:
MovingVariance([column], window_start, window_end)
Returns: Float
Context Filtering: ✓ Yes
Parameters
| Name | Type | Required | Description |
|---|
column | column | ✓ Yes | The numeric column to calculate moving variance for |
window_start | integer | ✓ Yes | The number of rows before the current row to include in the window (negative value) |
window_end | ✗ No | integer | The number of rows after the current row to include in the window (positive value). Defaults to 0. |
Allowed Column Types for column: INT, FLOAT, DECIMAL, NUMBER
Validation
- Minimum parameters: 2
- Maximum parameters: 3
Examples
MovingVariance([Sales], -6, 0)
Returns the variance of sales in a 7-day rolling window (current row and 6 previous rows).
MovingVariance([Response_Time], -29, 0)
Calculates a 30-day moving variance of response times, useful for tracking data dispersion over time.
MovingVariance([Stock_Returns], -19, 0)
Calculates a 20-day rolling variance for stock returns to analyze volatility.
Last modified on March 13, 2026