Loading
Salesforce Data Pipelines
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Numeric Operators and Functions for Formulas

          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.

          Operator Description
          + Calculates the sum of two values.
          - Calculates the difference between two values.
          * Multiplies the two values.
          / Divides the first value by the second.
          () Specifies that the expressions within the parentheses are evaluated first. All other expressions are evaluated using standard operator precedence.

          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.

          abs(field)

          field is a number value or (measure) field you want to determine the absolute value of.

          Example: abs(Amount)

          ceil Rounds a number up to the nearest integer.

          ceil(field)

          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.

          exp(field)

          field is a number value or (measure) field you want to raise by e.

          floor Returns a number rounded down to the nearest integer.

          floor(field)

          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 #,###,###.##.

          format_number(expr,format)

          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: format_number(12332.123456, '###,###,###,###,###,###.###') returns 12,332.123

          log Returns the logarithm of the number in the base you specify.

          log(value,field)

          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.

          power(field,value)

          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.

          round(field,numberOfDigits)

          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.

          sqrt(field)

          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.

          truncNumber(field,scale)

          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 0.

          Example: scale(13.111, 1) returns 13.1

           
          Loading
          Salesforce Help | Article