Functions List

The table below provides a quick reference list of all functions.

Function Description
addDays(date, integer) provides the ability to add or subtract days from a date
addMonths(date, integer)
provides the ability to add or subtract months from a date
addWorkDays(date, integer, [holidays])
provides the ability to add or subtract week days (i.e., Monday through Friday) from a date
average(value1, value2, [value3]…) returns the average value from a set of values
averageif(template API name, value, condition) returns the average value across all descendant instances of a specified template
betweenDates(value, startDate, endDate) returns the specified values between two dates
countif(template API name, condition) returns the number of descendant instances of a specified template
cumulative(value, date) returns the accumulated values of a metric since a designated date
cumulativeYTD(value) returns the accumulated values of a metric for the current FY
daily(value) returns a time-series array of values in a daily cadence
date(year, month, day) provides the ability to build a date
day(offset value) appended to a metric dataset and returns the value in the time period determined by the offset value
days(date1, date2) returns the number of days between two dates
encodeUrl(value)
provides the ability to include a string in a URL
formatDate(date, mask)
formats dates
if(condition, if true, if false) allows for a conditional evaluation that returns a boolean (i.e., true or false). Depending on the result, one of two expressions is run.
template__t.instance(autoID).attribute__c

template__t.instance(autoID).metric__m

references a specified instance of a template
isEmpty(value)
checks whether an attribute, metric or association holds a value
max(value1, value2, [value3]…) returns the largest number or latest date from a set of values
maxif(template API name, value, condition) returns the maximum value from a comparison of the value across all descendant instances of a specified template
min(value1, value2, [value3]…) returns the smallest number or earliest date from a set of values
minif(template API name, value, condition) returns the minimum value from a comparison of the value across all descendant instances of a specified template
month(offset value) appended to a metric dataset and returns the value in the time period determined by the offset value
monthly(value) returns a time-series array of values in a monthly cadence
npv(rate, value1, [value2]…)
calculates the Net Present Value of an investment
onDate(value, date) returns a value into the time period corresponding to its date argument
power(base, exponent)
provides the ability to use exponents in expressions
quarter(offset value) appended to a metric dataset and returns the value in the time period determined by the offset value
quarterly(value) returns a time-series array of values in a quarterly cadence
round(value, precision) rounds a number to a specified number of digits
sum(value1, value2, [value3]…) returns the summed total of a set of values
sumif(template API name, value, condition) returns the summed total for a value on all descendant instances of a specified template
timeperiod(time period)
appended to a metric dataset and references the value in a specific time period of a metric
today() returns the current (UTC) date
toFilter(value)
formats values into filter-friendly values
value(attribute API name) returns the numeric value contained in a text attribute
workDays(date1, date2, [holidays])
returns the number of weekdays (i.e., Monday-Friday) between two dates
year(offset value) appended to a metric dataset and returns the value in the time period determined by the offset value
yearly(value) returns a time-series array of values in a yearly cadence

 

Updated on June 21, 2022

Related Articles