Tableau CRM SAQL Reference
Summer '26 (API version 67.0)
Spring '26 (API version 66.0)
Winter '26 (API version 65.0)
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Winter '21 (API version 50.0)
Summer '20 (API version 49.0)
Spring '20 (API version 48.0)
Winter '20 (API version 47.0)
Summer '19 (API version 46.0)
Spring '19 (API version 45.0)
Winter '19 (API version 44.0)
Summer '18 (API version 43.0)
Spring '18 (API version 42.0)
Winter '18 (API version 41.0)
Summer '17 (API version 40.0)
Spring '17 (API version 39.0)
Winter '17 (API version 38.0)
Summer '16 (API version 37.0)
Spring '16 (API version 36.0)
Winter '16 (API version 35.0)
abs(n)
acos(n)
asin(n)
atan(n)
ceil(n)
cos(n)
degrees(n)
exp(n)
floor(n)
log(m, n)
pi()
power(m, n)
radians(n)
round(n[, m])
sign(n)
sin(n)
sqrt(n)
tan(n)
trunc(n[, m])
Windowing Functions
coalesce
Newer Version Available
Math Functions
To perform numeric operations in a SAQL query, use math
functions.
You can use SAQL math functions in foreach statements and in the filter by clause after a foreach statement.
You can't use math functions in a group by clause or in an order by clause. You also can't use math functions in the filter by clause before a foreach statement.
-
abs(n)
Returns the absolute number of n as a numeric value. n can be any real numeric value in the range of -1e308 <= n <= 1e308. This function can only be used in a foreach statement. -
acos(n)
Returns the arccosine value of radians value n. n can be any real numeric value in the range of -1 <= n <= 1. If null is passed as an argument, acos() returns null. This function can only be used in a foreach statement. -
asin(n)
Returns the arcsine value of radians value n. n can be any real numeric value in the range of -1 <= n <= 1. If null is passed as an argument, asin() returns null.This function can only be used in a foreach statement. -
atan(n)
Returns the arctangent value of radians value n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. If null is passed as an argument, atan() returns null. This function can only be used in a foreach statement. -
ceil(n)
Returns the nearest integer of equal or greater value to n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. This function can only be used in a foreach statement. -
cos(n)
Returns the cosine value of radians value n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. If null is passed as an argument, cos() returns null. This function can only be used in a foreach statement. -
degrees(n)
Returns the degrees value of a radians value n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. If null is passed as an argument, degrees() returns null. This function can only be used in a foreach statement. -
exp(n)
Returns the value of Euler's number e raised to the power of n, where e = 2.71828183… The smallest value for n that doesn’t result in 0 is 3e-324. n can be any real numeric value in the range of -1e308 <= n <= 700. This function can only be used in a foreach statement. -
floor(n)
Returns the nearest integer of equal or lesser value to n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. This function can only be used in a foreach statement. -
log(m, n)
Returns the natural logarithm (base m) of a number n. The values m and n can be any positive, non-zero numeric value in the range 0 < m, n <= 1e308 and m ≠ 1. The smallest value for m or n that will not produce 0 is log(10, 0.3e-323). This function can only be used in a foreach statement. -
pi()
Returns the value of π, where π=3.14139265. This function can only be used in a foreach statement. -
power(m, n)
Returns m raised to the nth power. m, n can be any numeric value in the range of -1e308 <= m, n <= 1e308. Returns null if m = 0 and n < 0. This function can only be used in a foreach statement. -
radians(n)
Returns the radians value of a degrees value n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. If null is passed as an argument, radians() returns null. This function can only be used in a foreach statement. -
round(n[, m])
Returns the value of n rounded to m decimal places. m can be negative, in which case the function returns n rounded to -m places to the left of the decimal point. If m is omitted, it returns n rounded to the nearest integer. For tie-breaking, it follows round half way from zero convention. n can be any real numeric value in the range of -1e308 <= n <= 1e308. m can be an integer value between -15 and 15, inclusive. This function can only be used in a foreach statement. -
sign(n)
Returns 1 if the numeric value, n is positive. It returns -1 if the n is negative, and 0 if n is 0. n can be any real numeric value in the range of -1e308 <= n <= 1e308. If null is passed as an argument, sign() returns null. This function can only be used in a foreach statement. -
sin(n)
Returns the sine value of radians value n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. If null is passed as an argument, sin() returns null. This function can only be used in a foreach statement. -
sqrt(n)
Returns the square root of a number n. The value n can be any non-negative numeric value in the range of 0 <= n <= 1e308. This function can only be used in a foreach statement. -
tan(n)
Returns the tangent value of radians value n. n can be any real numeric value in the range of -1e308 <= n <= 1e308. If null is passed as an argument, tan() returns null. This function can only be used in a foreach statement. -
trunc(n[, m])
Returns the value of the numeric expression n truncated to m decimal places. m can be negative, in which case the function returns n truncated to -m places to the left of the decimal point. If m is omitted, it returns n truncated to the integer place. n can be any real numeric value in the range of -1e308 <= n <= 1e308. m can be an integer value between -15 and 15 inclusive. This function can only be used in a foreach statement.