Math: Round to specific number of decimal places
Use this action to round a decimal to a specific number of decimal places. This action will round down on .5
. To round to the nearest whole number, use the Round numbers action.
For reference, here is an example of how this action will round different inputs.
Input | Number of decimal places | Rounded Output |
---|---|---|
10.933 | 2 | 10.93 |
10.4 | 4 | 10.4000 |
10.8 | 0 | 11 |
10.899 | 1 | 10.9 |
How to configure this action
When configuring this action, reference a Integer or decimal in the X field configuration, and enter an Integer or reference a field in the Total Decimal Places field configuration. How do I reference a field?
For more advanced math, use Javascript with the Field: Field Formulas action.
Fields for this action
-
X
- The integer or decimal to perform the operation on.
-
Total Decimal Places
- Enter the number of decimal places to round to. Enter
0
to round to the nearest whole number. - For example, If the Input is 10.388 and
Number of decimal places
is1
, the output will be10.4
.
- Enter the number of decimal places to round to. Enter
-
Output field prefix
- To help keep output fields organized, choose an output field prefix to add to the beginning of each output field name as this action may output more than one field.
What will this output?
This action may generate multiple fields. To help keep output fields organized, the prefix above will be added to the beginning of each of the output field names, separated by two dashes. Each field will result as:{{output-field-prefix--output-field}}
.
Output fields for this action
-
Result
- The result of the operation. The output is a decimal type field.
Get help with a problem or question
If something’s not working as expected, or you’re looking for suggestions, check through the options below.
The results field is empty
Math actions require integer or decimal values. If you enter an incompatible value for the input, the output may be blank. For example, attempting to perform an operation on the value Marine Biologist
will always return an empty field.
Thanks for your feedback
We update the Help Center daily, so expect changes soon.
Link Copied
Paste this URL anywhere to link straight to the section.