Functions
Drivetrain supports many pre-built functions.
The list of functions supported in the formula bar are listed below.
Math
ABS ( value )
Returns the absolute value of a number.
ABS ( -2 ) Output: 2
Logical
AND ( logical_expression_1, logical_expression_2 )
Returns true if both arguments are logically true, and returns false if either of the arguments are logically false.
AND ( 1 < 2 , true ) Output: true
Math
AVERAGE ( metric, start_index, end_index )
Calculates simple average or moving average for a metric or a variable.
AVERAGE ( Customers , 0 , 2 )
Info
BLANK
Assigns true if the metric value is blank or missing or encountered an error.
BLANK
Date
BOMONTH ( start_date, offset_in_months )
Calculates the date in yyyy-mm-dd format of the first day of the month, a specified number of months before or after the specified date.
BOMONTH ( '2023-09-20' , 3)
Output: 2023-12-01
Math
CEIL ( value )
Rounds up to the nearest whole number.
CEIL ( 23.2 )
Output: 24
Operator
CONCAT ( string_1, string_2,... string_n )
Appends strings to one another.
CONCAT ( first_name, ‘ ‘, last_name )
Date
DATE ( yyyy , mm , dd )
Converts numbers yyyy, mm, and dd to a date.
DATE ( 2023 , 2 , 3 )
Output: 2023-02-03
Date
DATEADD ( date, interval , interval_type )
Returns a date a specified number of days, months or years before or after a given date.
DATEADD ( DATE ( 2024 , 1 , 31 ) , 5 , 'M' )
Output: 2024 - 07 - 01
Date
DATEDIFF ( start_date, end_date, interval )
Returns the difference between two dates in the units (days, months, or years) requested.
DATEDIFF ( DATE ( 2024 , 1 , 1 ) , DATE ( 2024 , 12 , 31 ) , "D" )
Output: 365
Date
DATEVALUE ( date_text )
Converts a text in any of the date formats that Drivetrain supports into a date.
DATEVALUE ( '01/02/23' )
Output: 2023-01-02
DATEVALUE ( 'Sep 2023' )
Output: 2023-09-01
Date
DAY ( date )
Returns the day as a number between 1 and 31
DAY ( DATE ( 2023 , 12 , 31 ) )
Output: 31
Date
DAYSINMONTH ( date )
Returns the number of days in a month
DAYSINMONTH ( JoiningDate )
Date
EOMONTH ( start_date, offset_in_months )
Returns the date in yyyy-mm-dd format of the last day of the month, before or after a specified number of months.
EOMONTH ( '2023-09-20' , 3)
Output: 2023-12-31
Operator
EQUALS ( value_1 , value_2 )
Checks whether the two values are equal, and returns 1 if true and 0 if false.
EQUALS ( 1 , 2 )
Output: 0
EQUALS ( -2.5 , -2.5 )
Output: 1
Math
EVEN ( value )
Returns the number rounded up to the nearest even integer.
EVEN ( 1.4 )
Output: 2
Date
FINANCIALYEARSTARTMONTH ( )
Returns the starting month of the fiscal year start date set for your account.
FINANCIALYEARSTARTMONTH ( )
Math
FLOOR ( value )
Rounds down to the nearest whole number.
FLOOR ( 23.9 )
Output: 23
Statistical
FORECAST ( metric_or_variable, 'type_of_forecast' , start_index, end_index )
Finds the best fit line for the given data by using the linear regression method to forecast values for the time period specified.
FORECAST ( ARR, 'linear', 0, 6 )
Logical
IF ( condition, value_if_true, value_if_false )
Checks whether a condition is met, and returns one value if true and another value if false.
IF ( 12 > 2 , 33 , 44 )
Output: 33
Info
ISBLANK ( value )
Checks whether the given value is blank or missing or undefined or encountered an error. Returns TRUE or FALSE.
ISBLANK ( ARR )
Drivetrain
LAST ACTUALS DATE
Returns the latest date or month of 'actual' historic data.
LAST ACTUALS DATE
Drivetrain
LOOKUP ( value from column in the target list, match_condition_1, … match_condition_n )
Retrieves values from a target list or dataset by matching one or more columns between a planning list and the target list or dataset.
LOOKUP ( hike percentage, Employee id = EmpID, Position Start Date = Joining Date )
Text
LOWER ( text )
Converts a specified string to lowercase.
LOWER ( ProductCode )
Statistical
MAX ( value_1, value_2 )
Returns the largest of two values.
MAX ( 23 , 10 )
Output: 23
Text
MID ( text, starting_character, characters_to_extract )
Returns a segment of a string.
MID ( "A1b2C3", 2, 3 ) Output: 1b2
Statistical
MIN ( value_1, value_2 )
Returns the smallest of a list of values.
MIN ( 23 , -10 )
Output: -10
Math
MOD ( value_1, value_2 )
Returns the remainder (an integer value) after dividing the first number by the second number.
MOD ( 26 , 5 )
Output: 1
Drivetrain
MONTH
Returns the month as a number between 1 and 12.
MONTH
Date
NETWORKDAYS (start_date, end_date)
Returns the number of whole workdays between two dates (inclusive). Weekend days are not considered as workdays.
NETWORKDAYS ( DATE ( 2023 , 01 , 01 ) , DATE (2023 , 12 , 31 ) )
Output: 260
Logical
NOT ( logical_expression )
Returns the inverted value or expression passed to it. If false, then returns true and vice versa.
NOT ( true )
Output: false
Math
ODD ( value )
Returns the number rounded up to the nearest odd integer.
ODD ( 1.4 )
Output: 3
Logical
OR ( logical_expression_1, logical_expression_2 )
Returns true, if one of the arguments is true and returns false if both arguments are false.
OR ( true , true )
Output: true
Drivetrain
PERIOD
Enables period-over-period comparisons such as year-over-year—i.e, comparing metrics from one period of one year to the same period of a previous year (e.g, Q2 2024 to Q2 2023). .
PERIOD
Drivetrain
PRORATA ( start_date, end_date )
Returns the pro rated days in a month as a fraction of the total number of days in a month for each month between the two dates specified (both inclusive).
PRORATA ( DATE (2024, 06, 01), DATE ( 2024, 10, 15)
Date
QUARTERTODATE ( date )
Returns the cumulative value from the start of the current quarter to the current date
QUARTERTODATE ( Revenue )
Math
ROUND ( value )
Rounds to the nearest whole number.
ROUND ( 23.2 )
Output: 23
Math
ROUNDDOWN ( value, places )
Rounds a number to the specified number of decimal places, always rounding down to the next valid increment.
ROUNDDOWN ( 23.649, 2 ) Output: 23.64
Math
ROUNDUP ( value, places )
Rounds a number to the specified number of decimal places, always rounding up to the next valid increment.
ROUNDUP ( 23.449, 2 ) Output: 23.45
Financial
SLN ( cost , salvage , life , start_date )
Calculates the depreciation of an asset for one period using the straight-line method.
SLN ( 100000 , 5000 , 5 , DATE ( 2023 , 2 , 3 ) )
Math
SUM ( metric, start_index, end_index )
Calculates the sum across the period specified for a metric or a variable.
SUM ( Customers , 0 , 2 )
Drivetrain
SUMMARIZE (
metric, dimension1,
dimension2 ,... )
Aggregates the values in a metric by its aggregation summary type (sum, average or formula) for the specified dimensions.
SUMMARIZE ( Revenue, Country )
Drivetrain
THIS MONTH
Returns the last date of the current month
THIS MONTH
Drivetrain
TODAY ()
Returns today’s date.
TODAY ( )
Text
UPPER ( text )
Converts a specified string to uppercase.
UPPER ( ProductCode )
Text
VALUE ( text )
Converts a text in a number format into a number.
VALUE ( ProductID )
Date
YEAR ( date )
Returns the year
YEAR ( DATE ( 2023 , 2 , 3 ) )
Output: 2023
Date
YEARTODATE ( metric )
Returns the cumulative value from the start of the current year to the current date
YEARTODATE ( Revenue )
Last updated
Was this helpful?