Add formula column

The Formula step allows you to create a new column in your dataset by applying a custom formula to existing columns.

Step parameters

  1. New Column (string)*: Specify the name for the new column that will contain the result of your formula.

  2. Formula*: Enter the formula you want to apply. This can be a mathematical expression, a string manipulation, or a combination of functions. You can reference existing columns in your formula.

Example

Input

Add - Add formula column input

Configuration

{
    "new_column": "monthly_salary",
    "formula": "salary/12"
}

Output

Add - Add formula column output

Supported operators

The following operators are supported by the formula step (note that a value can be a column name or a literal, such as 42 or foo).

  • +: Does an addition of two numeric values. See the concatenate step to append strings

  • -: Does an substraction of two numeric values. See the replace step to remove a part of a string

  • *: Multiplies two numeric values.

  • /: Divides a numeric value by another. Divisions by zero will return null.

  • %: Returns the rest of an integer division. Divisions by zero will return null.

Last updated

Was this helpful?