# Iterative Calculations

## General information

Brick applies a function to the selected column using exponential weighted and cumulative functions. Generally described as

## Description

### Brick Locations

Bricks Calculations → Iterative Calculations

### Brick Parameters

• Column
• List of possible columns for selection. This field is obligatory for any setting selected. The parameter accepts only columns with integer/float data types.
• Function
• List of possible functions to apply. This field is obligatory for any setting selected.
• Cumulative sum
• This function uses the sum function for values in a specified column with accumulation
- is an index of column selected for cumulative sum;
- is a number of elements for i-th column
• Cumulative min
• This function uses the min function for values in a specified column with accumulation
• Cumulative max
• This function uses the max function for values in a specified column with accumulation
• Cumulative product
• This function uses the product function for values in a specified column with accumulation.
• Exponentially weighted average
• Perform exponentially weighted (EW) calculations with a mean aggregation function
• Exponentially weighted standard deviation
• Perform exponentially weighted (EW) calculations with a standard deviation aggregation function
• Exponentially weighted variance
• Perform exponentially weighted (EW) calculations with a variance aggregation function
Rule how we calculate exponentially weighted (EW) calculations:
• Span
• The integer parameter shows only while one of the exponentially weighted functions is chosen. It is interpreted as the number of days for which the n-day moving average is calculated.

### Brick Inputs/Outputs

• Inputs
• Brick takes the dataset.
• Outputs
• Brick produces a dataset with new columns created, with the short name of the operation performed. For example, if you have an “age” column and want to calculate exponential weighted moving variance, the new column “age_var” will be created.

## Example of usage

Let's use this brick on the custom dataset that contains information about orders count per day. The general information about the dataset is represented below:
• id - ID of customer
• eventDate (datetime) - date
• Total_ordered_quantity (float) - Total amount of orders per day
Let’s move to the brick usage, we will use all presented functions above on different numerical columns: