How-to | Handle accounting-style negative numbers#

In Accounting, it is common to represent negative numbers with leading and trailing parentheses. For example, (200) equals -200.

A Find and replace step in the Prepare recipe can transform a string column with values like (200) into a numeric column with values like -200.

Find and replace step#

In a Find a replace step:

  1. Choose the column with the accounting-style values.

  2. Replace the open parenthesis with a hyphen (minus sign).

  3. Replace the closed parenthesis with no value.

../../_images/accounting-find-replace.png

Note

The storage type of the original column is a string, but the newly-created column is a double.

In this example, only one column is being converted. Changing the Column setting from single to multiple would allow you to convert multiple columns in the same step.