Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
About Salesforce Data 360
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

          Use numeric functions to calculate values from measures. For example, you can round, truncate, and determine the absolute value of a number. The arguments for numeric functions can be numbers or measure fields.

          When entering a formula, use the API name of the field 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 or measure field that 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 or measure field that 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 or measure field to which you want to raise e.

          floor Returns a number rounded down to the nearest integer.

          floor(field)

          field is a number or measure field that 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 or measure field that you want to change the format of.

          format is the new format to be applied to the numbers in the field. 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 that you specify.

          log(value,field)

          value is a number or measure field used as the base of the logarithm.

          field is a number or measure field that you want to take the logarithm of.

          power Raises a number to the power of another number.value

          power(field, value)

          field is a number or measure field that you want to raise to the specified power.

          value is a number or measure field that is the power that you want to raise the specified 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 or measure field that you want to round.

          numberOfDigits is a number or measure field that specifies the number of digits to round the specified number to.

          sqrt Returns the positive square root of a given number.

          sqrt(field)

          field is a number or measure field that 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 or measure field that 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