Rolling Window

Moving average, sum, min, or max over a sliding window of rows

What It Does

Rolling Window computes a running aggregate (AVG, SUM, MIN, MAX, COUNT) over a sliding window that includes the current row plus a configured number of preceding rows. Common uses: 7-day moving averages, trailing 30-row sums, smoothing noisy time series.

How to Use It

Opening the Panel

Click the + button in the toolbar or press the operation picker, then search for "Rolling Window". It's in the Aggregate group.

Configuration

FieldTypeRequiredDescription
Source columnColumn select (numeric)YesColumn to aggregate over
AggregationSelectYesAVG, SUM, MIN, MAX, COUNT
Window sizeNumberYesHow many rows back from the current row to include
Order byColumn selectYesColumn that defines row order (often a date)
Partition byColumn selectNoIf set, the window resets per partition
Output columnTextYesName of the new column
SQL generated under the hood
SELECT *, AVG(revenue) OVER (PARTITION BY region ORDER BY order_date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS revenue_7d_avg FROM data
Try this operation →

Related Operations