Format numbers
Last updated
Last updated
The Format numbers step can reformat numbers across as many columns as you choose in this step's settings. It can add or remove commas, currencies, and accounting formats to numbers, or round numbers and format them as percentages.
Let's use some of our store's sales information as the input data.
In this example, we'll want to reformat the numbers displayed in the columns "Unit Price" and "Sales Amount" by removing the decimals.
After connecting the data to this step and setting it up, it shows the numbers in "Unit Price" and "Sales Amount" columns are without decimals.
When you first connect your data into the Format numbers step, Pick the dataset, then type the "Columns to format", then select The "Format as" ex: 2,500.
The Format numbers step provides the following formatting options:
Numbers
Percent
Currency
Accounting
You can also add multiple formatting rules within the same step by clicking on the Add Format Rule button. Please note that your formatting rules will be applied from the top down.
When you select to format columns as Numbers, you will have three additional settings to configure:
Comma grouping: You can choose whether to apply comma groupings or not. Selecting to apply comma grouping will add a comma for every thousands.
Decimals: You can input how many decimal places you'd like to display.
Rounding: You can choose whether to round to the nearest value, round down, or round up.
The Format numbers step can also remove formatting from numbers. For example, if you have a column that contains the value, "$4000", you can configure to format this column as a "Number" which will update the formatting of the value to "4000".