# Window processor

Performs calculations on specific data ranges.

The Window processor allows you to aggregate and perform calculations using values from multiple rows grouped in a range, and produce a value for each row separately.

## Usage

The Window processor requires one input flow and can generate only one output flow.

## Properties

Properties to configure to create windows aggregations.

Configuration

| Property | Configuration |
| --- | --- |
| Operation | Use the drop-down to select the operation to apply during the windowing process:<br><br><ul> <li> <p><span>Sum</span>: Calculates the sum of the records in the selected range.</p> </li> <li> <p><span>Avg</span>: Calculate the average value of the records in the selected range.</p> </li> <li> <p><span>Count</span>: Retrieves the number of records in the selected range, including duplicates.</p> </li> <li> <p><span>Count distinct</span>: Retrieves the number of unique records in the selected range.</p> </li> <li> <p><span>Min</span>: Returns the smallest value of the selected range.</p> </li> <li> <p><span>Max</span>: Returns the largest value of the selected range.</p> </li> <li> <p><span>First</span>: Retrieves the value of the first record of the selected range.</p> </li> <li> <p><span>Last</span>: Retrieves the value of the last record of the selected range.</p> </li> <li> <p><span>Concatenate</span>: Combines the values into a single string separated by the <span>Delimiter</span> of your choice.</p> </li> <li> <p><span>Row number</span>: Assigns a row number to each value of the selected window.</p> </li> <li> <p><span>Rank</span>: Calculates the rank of the selected range compared to the other windows.</p> </li> </ul> |
| Fields | Use the check boxes to select the field or fields on which you want to apply the function. |
| New field name | Give a custom name to the output field or edit it. When more than one field was selected, a name is constructed using the field name, the operation and optional range. |
| Partition by fields | Use the check boxes to select the field or fields by which to partition. |
| Start range | Use the drop-down to select the end range of the partition:<br><br><ul> <li> <p><span>Unlimited</span> </p> </li> <li> <p><span>Current row</span> </p> </li> <li> <p><span>Preceding</span> </p> </li> <li> <p><span>Following</span> </p> </li> </ul> |
| End range | Use the drop-down to select the end range of the partition:<br><br><ul> <li> <p><span>Unlimited</span> </p> </li> <li> <p><span>Current row</span> </p> </li> <li> <p><span>Preceding. </span>Enter a number of rows to set the range of action of the function.</p> </li> <li> <p><span>Following. </span>Enter a number of rows to set the range of action of the function.</p> </li> </ul> |
| Sort by | Use the search field to find a field to sort by. Sorting is optional for all operations except for Row number and Rank. |
| Sort order | Select the sorting order between Ascending and Descending. |

To rename the processor or edit its description, point your mouse over the name or description to change in the Properties panel and click the Edit icon.

## Video summary

[View video clip](https://play.vidyard.com/dviZjTMPzFGVZdiLr7gmAe)