Math Functions
Mappings: Functions and Expressions · Updated June 9, 2025
Add and Sum
Description
- Returns the sum of two or more numbers, or all numbers in a list.
ℹ️ ADD and SUM are synonymous and can be used interchangeably
Syntax
ADD(value_or_list, [val2, ...])
or
SUM(value_or_list, [val2, ...])Example
-
ADD(1,2)andSUM(1,2)both return3
Absolute Value
Description
- Returns the absolute value of the parameters supplied. Applies to a list in the first argument's position.
Syntax
ABS(num, [num, ...])Examples
-
ABS(10)returns10 -
ABS(-10)returns10 -
ABS(5-3)returns2 -
ABS(3-5)returns2 -
ABS(-5,1,-23)returns[5, 1, 23] -
ABS(source.total_refund)returns the absolute value of the number in thetotal_refundfield in a data source (this expression will error if thetotal_refundfield is not a number)
Decimal and Number
Description
- Converts the text representation of a number into decimal base 10.
ℹ️ DECIMAL and NUMBER are synonymous and can be used interchangeably
Syntax
DECIMAL(value, [value, ...])
or
NUMBER(value, [value, ...]) Examples
-
DECIMAL(5+10)andNUMBER(5+10)both return15 -
DECIMAL(source.Impressions__Google_Ads)converts theImpressions__Google_Adsfield in a Google Ads flat file from a string to a number -
DECIMAL("D")andNUMBER("D")both return an error
Divide and Quotient
Description
- Returns the quotient of one number divided by a second number. This function is equivalent to the
/operator.
ℹ️ DIVIDE and QUOTIENT are synonymous and can be used interchangeably
Syntax
DIVIDE(value, [value, ...])
or
QUOTIENT(dividend, divisor)Examples
-
DIVIDE(4,2)andQUOTIENT(4,2)each return2.0 -
ROUND(DIVIDE(10,3),2)andROUND(QUOTIENT(10,3),2)each return3.33
Integer
Description
- Rounds a number down to the nearest integer that is less than or equal to it.
Syntax
INT(value, [value, ...])Examples
-
INT(10.6)returns10 -
INT("D")returns an error
Minus and Subtract
Description
- Returns the difference between parameters (from first to last). Applies to elements in list if first parameter. This function is equivalent to the
-operator.
ℹ️ MINUS and SUBTRACT are synonymous and can be used interchangeably
Syntax
MINUS(value, [value, ...])
or
SUBTRACT(value, [value, ...])Examples
-
MINUS(5,2)andSUBTRACT(5,2)each return3
Modulo Operator
Description
- Returns the result of the modulo operator, i.e., the remainder after a division operation.
Syntax
MOD(dividend, divisor)Examples
-
MOD(14,5)returns4
Multiply and Product
Description
- Returns the product of two numbers. This function is equivalent to the
*operator.
ℹ️ MULTIPLY and PRODUCT are synonymous and can be used interchangeably
Syntax
MULTIPLY(value, [value, ...])
or
PRODUCT(factor1, [factor2, ...])Examples
-
MULTIPLY(4,5)andPRODUCT(4,5)each return20 -
MULTIPLY(3,8,9)andPRODUCT(3,8,9)each return216
Negate and U Minus
Description
- Negates the arguments passed in. List allowed as first argument to negate all values in list.
ℹ️ NEGATE and UMINUS are synonymous and can be used interchangeably
Syntax
NEGATE(num, [num, ...])
or
UMINUS(value)Examples
-
NEGATE([1,-2,3])andUMINUS([1,-2,3])each return[-1, 2, -3] -
NEGATE(source.total_refund)andUMINUS(source.total_refund)each return thetotal_refundfield in the source data negated
Pow and Power
Description
- Returns a number raised to a power. This functions are equivalent to the
^operator.
ℹ️ POW and POWER are synonymous and can be used interchangeably
Syntax
POW(numeric, exponent)
or
POWER(numeric, exponent)Examples
-
POW(2,2),POWER(2,2), and2^2all return4
Round
Description
- Rounds a number to a certain number of decimal places according to standard rules.
Syntax
ROUND(numeric, [places])Examples
-
ROUND(2.392)returns2 -
ROUND(2.392,2)returns2.39 -
ROUND(2.392,1)returns2.4 -
ROUND(2.922)returns3
Round Down
Description
- Rounds a number to a certain number of decimal places, always rounding down to the next valid increment.
Syntax
ROUNDOWN(numeric, [places])Examples
-
ROUNDDOWN(2.9)returns2.0 -
ROUNDDOWN(42.249,2)returns42.24
Round Up
Description
- Rounds a number to a certain number of decimal places, always rounding up to the next valid increment.
Syntax
ROUNDUP(numeric, [places])Examples
-
ROUNDUP(2.01)returns3.0 -
ROUNDUP(42.249,2)returns42.25