You are here:
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.
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 or measure field that you want to determine the absolute value of. Example:
|
ceil |
Rounds a number up to the nearest integer. |
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. |
field is a number or measure field to which you want to raise e. |
floor |
Returns a number rounded down to the nearest integer. |
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 #,###,###.##. |
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: |
log |
Returns the logarithm of the number in the base that you specify. |
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 |
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. |
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. |
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. |
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 Example:
|

