You are here:
Numeric Operators and Functions for Formulas
In Salesforce Data Pipelines, use numeric functions to calculate values from numbers in your recipe. For example, you can round, truncate, and determine the absolute value of a number. The arguments for numeric functions can be number values or columns.
Numeric Operators and Functions for Formulas
When entering a formula, use the API name of the column in the expression, not the label. The parameters section is surrounded by parentheses. For example, you can enter the following expression.
round(Total_Amount/Unit_Price, 2)You can use the following math operators.
You can also use the following numeric functions in an expression.
| Numeric Function | Description | Syntax |
|---|---|---|
abs
|
Calculates the absolute value of a number. The absolute value of a number is the number without its positive or negative sign. |
field is a number value or (measure) field you want to determine the absolute value of. Example: |
ceil
|
Rounds a number up to the nearest integer. |
field is a number value or (measure) field you want to round up to the nearest integer. |
exp
|
Returns a value for e raised to the power of a number you specify. |
field is a number value or (measure) field you want to raise by e. |
floor
|
Returns a number rounded down to the nearest integer. |
field is a number value or (measure) field you want to round down to the nearest integer. |
format_number
|
Formats a number by rounding to the specified number of decimal places or by applying a certain format, for example #,###,###.##. |
expr is a number value or (measure) field you want to change the format of. format is the new format to be applied to the numbers in the column. The parameter can be in the format composed as '#,###,###.##' or actual numerals like ‘12,332.1235’. This parameter is optional. If you don’t specify a format, the field is truncated to an integer. Example: |
log
|
Returns the logarithm of the number in the base you specify. |
value is a number value or (measure) field used as the base of the logarithm. field is a number value or (measure) field you want to take the logarithm of. |
power
|
Raises a number to the power of another number. |
field is a number value or field you want to raise to the specified power. value is a number value or (measure) field that is the power you want to raise the number to. |
round
|
Returns the nearest number to a number you specify, constraining the new number by a specified number of digits. |
field is a number value or (measure) field you want to round. numberOfDigits is a number value or (measure) field that specifies the number of digits to round the number to. |
sqrt
|
Returns the positive square root of a given number. |
field is a number value or (measure) field you want to find the square root of. |
truncNumber
|
Truncates the specified number of decimal values from the number, or converts to an integer. |
field is a number value or (measure) field you want to truncate. scale is the number of digits you want to
the right of the decimal point. This parameter is required. If you don’t specify
want any decimal values, use a Example: |

