Carrot reference
Functions
functions in charthop work just like functions in spreadsheets they perform calculations on particular data (passed in as parameters ) and return a return value some functions also retrieve data from the charthop database syntax a function in carrot appears as the function name followed by parentheses, which accepts one or several parameter values function(parameter1, \[parameter2]) all function names are case insensitive usage functions can be used in any carrot expression, anywhere carrot is used (in smart calc or smart bucket field types, when filtering the data sheet, configuring charts within dashboards, building out custom content for the homepage or profiles, etc ) function list function description https //docs charthop com/abs returns the absolute value of a given value https //docs charthop com/asof returns the result of a carrot expression on a particular date using either only primary data, or both primary and scenario based data https //docs charthop com/boolean converts supported datatypes into a boolean, equal to either true or false https //docs charthop com/comphistory returns the value of base or variable compensation on a given date https //docs charthop com/compbetween calculates the base, variable or cash compensation of a person over a specified period of time including all jobs the person has held https //docs charthop com/costbetween calculates the cost of a job over a specified period of time where the cost of a job includes if multiple people have held that job https //docs charthop com/grpu date converts input to date including relative date input https //docs charthop com/day returns the day of the month of a particular date https //docs charthop com/daysoffbetween returns the number of days off taken between two given dates https //docs charthop com/diffyears returns the total number of years between two given dates https //docs charthop com/diffmonths returns the total number of months between two given dates https //docs charthop com/distance returns the distance between built in addresses in charthop in the specified units https //docs charthop com/monthend returns the last day of a given month https //docs charthop com/formatmoney converts a given value of type money into a string , while retaining the currency type in the string output optionally specify the format and locale of the returned value https //docs charthop com/formatround converts a given value into a string , rounded to specific decimal place accepts number , money , or percent datatypes https //docs charthop com/formatnumber converts a given value of type number into a string https //docs charthop com/formatpercent converts a given value of type percent into a string https //docs charthop com/formatdate converts a given value of type date into a string https //docs charthop com/grantedshares returns all of the shares that were granted between two specified dates https //docs charthop com/length returns the number of items in a list or set, or the length of a string https //docs charthop com/k5dk max returns the highest of all values passed as parameters https //docs charthop com/mean returns the mean value of all the passed parameters, excluding nulls https //docs charthop com/money converts a given value to datatype money , including currency conversion https //docs charthop com/month returns the ordinal number of the month of a particular date, from 1 12, where 1 is january, 2 is february, and so on https //docs charthop com/min returns the lowest of all values passed as parameters https //docs charthop com/nextanniversary given a date, returns the next upcoming anniversary of that date https //docs charthop com/number given a value, returns that value as a number https //docs charthop com/pluralize given a value of type string , returns that value in plural form https //docs charthop com/l3gk percent given a value, returns that value as a percent https //docs charthop com/random returns a random number between 0 and 1 https //docs charthop com/round rounds a given value to the defined number of decimal places https //docs charthop com/roundup rounds a given value to the next largest integer https //docs charthop com/rounddown rounds a given value to the next smallest number https //docs charthop com/ocdo string given a value, returns that value as a string https //docs charthop com/substring given a string and specified parameters, returns a part of that string https //docs charthop com/stockprice given a date , returns the value of shares on that date https //docs charthop com/monthstart returns the first day of a given month https //docs charthop com/split divides a string into a list of strings https //docs charthop com/vestvalue given a start date and end date, returns the share price value of stock that will vest over that period of time https //docs charthop com/vestshares given a start date and end date, returns the number of shares that will vest over that period of time https //docs charthop com/year returns the gregorian calendar year of a particular date
