Skip to Content

Calculate Columns

Applies simple arithmetic to two columns.

Example

A

B

23
45

Multiply

A

B

calculate

236
4520

Configuration

Left Operand

Select a column to use as the left side values.

Operator

Select Add, Subtract, Multiply or Divide for the calculation.

Right Operand

Select a column to use as the right side values.

Screen Shot of configuring the Calculate columns transform

Adding the Transform

  1. Select two columns by clicking on their column headers in the table.
  2. Find one of the suggested Calculate Column transform under Column Manipulation group.

Alternatively, you can click on + Add Script Step on the right of the Wrangler to find the Apply arithmetic item after expanding Column Manipulation group.

Screen Recording of adding the Calculate transform

Key Considerations

  • To apply this transform, the data type of both Left Operand and Right Operand needs to be integer, wide integer, or number. You can use Set Column Type to change a column’s data type before applying this transform.
  • The new column has a default name calculate, to change it you can use Rename Column.