Add formula column
Last updated
Was this helpful?
The Formula step allows you to create a new column in your dataset by applying a custom formula to existing columns.
New Column (string)*: Specify the name for the new column that will contain the result of your formula.
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.
Input

Configuration
Output

A column can be referenced by its name without quotes unless they include whitespaces, in such a case you need to use brackets ‘[]’ (e.g. [myColumn]).
Any characters string escaped with quotes (simple or double) will be considered as a string.
The supported operators are : addition (+), substraction (-), multiplication (*), division (/), modulo (%).
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?
Was this helpful?
{
"new_column": "monthly_salary",
"formula": "salary/12"
}