Datalexing formula fields enable you to dynamically calculate values for each cell in the field based on a formula. These formulas function similarly to those found in other spreadsheet tools and boast a growing collection of functions while maintaining lightning-fast performance.
Operators
Operators are symbols that represent actions or comparisons in a formula. They are used to perform arithmetic operations, logical comparisons, and text concatenation.
Operators | Description | Syntax | Attributes | Example |
+ | the ADD function Returns the two number added together. | Value 1 + Value 2 | Value 1: This is the first number you want to add. | 1 + 2 = 3 |
/ | the DIVIDE function Returns its two arguments divided, the first divided by the second. | Value 1 / Value 2 | Value 1 (Dividend): This is the number that you want to divide. | 10 / 5 = 2 |
= | the EQUAL function Returns TRUE if its two arguments have the same value, otherwise FALSE. | Value 1 = Value 2 | Value 1: This is the first thing you want to compare. | 10 = 10 True 12 = 4 False |
> | the GREATER THAN Returns TRUE if the first argument greater than the second, otherwise FALSE. | Value 1 > Value 2 | Value 1: This is the initial value you want to compare. | 10 > 4 True False |
>= | the GREATER THAN OR EQUAL Returns true if the first argument greater than or equal the second, otherwise false. | Value 1 >= Value 2 | Value 1: This is the initial value you want to compare. | 10 >= 1 True 10 >= 11 False |
< | the LESS THAN function Returns TRUE if the first argument less than the second, otherwise FALSE. | Value 1 < Value 2 | Value 1: This is the first number or value you want to compare. | 10 < 11 True 10 < 1 False |
<= | the LESS THAN OR EQUAL function Returns TRUE or EQUAL if the first argument less than the second, otherwise FALSE. | Value 1 <= Value 2 | Value 1: This is the number you want to compare. | 19 <= 21 True 19 <= 1 False |
- | the MINUS function Returns the two number subtracted. | Value 1 - Value 2 | Value 1: This is the first number you want to subtract from. | 10 - 2 = 8
|
* | the MULTIPLY function Returns its two arguments multiplied together. | Value 1 * Value 2 | Value 1: This is the first number you want to multiply. | 10 * 3 = 30 |
!= | the NOT EQUAL function returns TRUE if its two arguments have different values. | Value 1 != Value 2 | Value 1: This is the first value that you want to compare. | 10 != 9 True 10 != 10 False |
Functions are predefined formulas that perform specific tasks or calculations. They take input arguments, perform operations, and return results. DataLexing provides a variety of built-in functions to manipulate data, perform calculations, and analyze information.
This table list all of Functions available within Datalexing
Formula Name | Description | Syntax | Attributes | Example |
BUTTON | the BUTTON function return a hypertext button using a URL and label | BUTTON(Link, Text) | Link: This is the web address (URL) where the button will take the user when clicked. | BUTTON('http://your-text-here.com', 'your-label') |
GET_LINK_LABEL | The GET LINK LABEL return the label from a formula using the link or button functions | GET_LINK_LABEL(Column Formula BUTTON) | Column Formula BUTTON: This is the button Formula from which you want to retrieve the label text. | GET_LINK_LABEL(FIELD('formula button FIELD')) = 'your-label' |
GET_LINK_URL | The GET LINK URL return the link from a formula using the link or button functions | GET_LINK_URL(LINK Field, Button Field) | LINK Field: This is where you provide the link field you want to get the URL from. | GET_LINK_URL(FIELD('formula link FIELD')) = 'http://your-text-here.com' |
LINK | the LINK function returns a hyperlink using the URL provided in the first argument. | LINK(LINK) | LINK: You provide the Link (URL) of where you want the Link to take someone when they click on it. | LINK('http://your-text-here.com') |
CONCAT | the CONCAT function returns all the arguments joined together in a single sentence | CONCAT(Anything, Anything, ...) | Anything: You can think of each "anything" as a piece of text or data that you want to combine. | CONCAT('A', 1, 1=2) = 'A1false' |
CONTAINS | the CONTAINS function indicates whether or not a search text (second argument) is present inside the source string (first argument) returns TRUE if the search text exist in the source text or FALSE otherwise. | CONTAINS(Source Text, Search Text) | Source Text: This is the original text where we want to search for another piece of text. | CONTAINS('test', 'e') = true |
LEFT | the LEFT function Extracts the left characters from the first input, stops when it has extracted the number of characters specified by the second input. | LEFT(Text, Number) | Text: This is the piece of text from which you want to extract characters. | LEFT('abcde', 2) = 'ab', |
LEN | the LEN function returns the number of characters from the source field provided. | LEN(Text) | Text: This is the text you want to count the characters of. It could be any written content | LEN('abc') = 3 |
LOWER | the LOWER Function Returns its argument in lower case. | LOWER(Text) | Text: This is the piece of text that you want to convert to lowercase. | LOWER('ArrAnge') = 'arrange' |
REGEX_REPLACE | the REGEX REPLACE function Replaces all instances of strings matching a regular expression with a new string. | REGEX_REPLACE(Text, regex Text (pattern), replacement Text (new string)) | Text: This is the original text where you want to search for patterns and make replacements. | REGEX_REPLACE('abc', 'a', '1') = '1bc' |
REPLACE | the REPLACE function Search for a matching text from the second argument to replace it with a text from the third argument in the source text | REPLACE(source Text, search Text, replacement Text) | Source Text: This is the original text where you want to make changes. | REPLACE('test a b c test', 'test', '1') = '1 a b c 1' |
REVERSE | the REVERSE function Returns the reversed text of the provided first argument. | REVERSE(Text) | Text: This is the message or string of text that you want to flip around. | REVERSE('abc') = 'cba' |
RIGHT | the RIGHT function Extracts the right characters from the first input, stops when it has extracted the number of characters specified by the second input. | RIGHT(Text, Number) | Text: This is the piece of text from which you want to extract characters. | RIGHT('abcde', 2) = 'de' |
SEARCH | the SEARCH function returns the number of the character at which a specific character or text string is first found, | SEARCH(Text, Text) | Text: This is the text you want to search within. | SEARCH('a b c test', 'test') = 7 |
T | the T function returns the values if it was a text otherwise it returns null value | T(Value) | Value: This is the value that you want to check if it's text or not. | T(10) = nothing |
TOTEXT | the TOTEXT function returns the referenced values to text | TOTEXT(Value) | Value: This is the data or information that you want to convert into text. It can be any kind of information, such as numbers, dates, or text itself. | TOTEXT(10) = '10' |
TRIM | the TRIM function removes all whitespace from the left and right sides of the input. | TRIM(Text) | Text: This is the piece of text or string that you want to clean up by removing any extra spaces. | TRIM(' abc ') = 'abc' |
UPPER | the UPPER Function Returns its argument in upper case. | UPPER(Text) | Text: This is the text you want to convert into uppercase letters. | UPPER('aPpLe') = 'APPLE' |
DIVIDE | the DIVIDE function Returns its two arguments divided, the first divided by the second. | DIVIDE(Number, Number) | Number (Dividend): This is the number that you want to divide. | DIVIDE(10,2) = 5 |
GREATEST | the GREATEST function compares two values and returns the highest value. | GREATEST(Number, Number) | Number 1: This is the first number you want to compare. | GREATEST(1,2) = 2 |
LEAST | the LEAST function compares two values and returns the lowest value. | LEAST(Number, Number) | Number 1: This is the first number you want to compare. | LEAST(1,2) = 1 |
MULTIPLY | the MULTIPLY function Returns its two arguments multiplied together. | MULTIPLY(Number, Number) | Number 1: This is the first number you want to multiply. | MULTIPLY(2, 5) = 10 |
ROUND | the ROUND function Returns first argument rounded to the number of digits specified by the second argument. | ROUND(Number, Number) | Number: This is the numerical value that you want to round. | ROUND(1.12345,2) = 1.12 |
TONUMBER | the TONUMBER function Converts the input to a number if possible. | TONUMBER(Text) | Text: This is the input that you want to convert into a number. | TONUMBER('10') = 10 |
TRUNC | the TRUNC function Returns only the first argument converted into an integer by truncating any decimal places. | TRUNC(Number) | Number: This is the value you want to truncate. | TRUNC(1.49) = 1 |
AND | The AND function returns the boolean value TRUE if all arguments are true, and the boolean value FALSE otherwise. | AND(Condition 1, Condition 2) | Condition 1: This is the first condition that the function checks. | AND(true, false) = false |
EQUAL | the EQUAL function Returns TRUE if its two arguments have the same value, otherwise FALSE. | EQUAL(Value 1, Value 2) | Value 1: This is the first thing you want to compare. | EQUAL('a', 'a') |
GREATER_THAN | the GREATER THAN Returns TRUE if the first argument greater than the second, otherwise FALSE. | Value 1 > Value 2 | Value 1: This is the initial value you want to compare. | 1 > 2 = false |
GREATER_THAN_OR_EQUAL | the GREATER THAN OR EQUAL Returns true if the first argument greater than or equal the second, otherwise false. | Value 1 >= Value 2 | Value 1: This is the initial value you want to compare. | 1 >= 1 = true |
IF | the IF functions tests the accuracy for the first argument if it was true then returns the second argument, otherwise returns the third. | IF(Condition, True Result, False Result) | Condition: This is the statement or test that the function evaluates to determine whether it's true or false. | IF(FIELD('text field') = 'on', 'it is on', 'it is off') |
ISBLANC | the ISBLANC function returns TRUE if the argument is empty or blank, FALSE otherwise. | ISBLANC(Value) | Value: This is the input you want to check. | ISBLANC('10') |
LESS_THAN | the LESS THAN function Returns TRUE if the first argument less than the second, otherwise FALSE. | Value 1 < Value 2 | Value 1: This is the first number or value you want to compare. | 2 < 1 = false |
LESS_THAN_OR_EQUAL | the LESS THAN OR EQUAL function Returns TRUE or EQUAL if the first argument less than the second, otherwise FALSE. | LESS_THAN_OR_EQUAL(Number,Number) | Number 1: This is the number you want to compare. | LESS_THAN_OR_EQUAL(1,3) |
NOT | the NOT function Returns FALSE if the argument is TRUE and TRUE if the argument is FALSE. | NOT(Condition) | Condition: This is the statement or condition we want to evaluate. | NOT(true) = false, NOT(10=2) = true |
NOT_EQUAL | the NOT EQUAL function returns TRUE if its two arguments have different values. | NOT_EQUAL(Value 1, Value 2) | Value 1: This is the first value that you want to compare. | NOT_EQUAL(1, 2), NOT_EQUAL('a', 'b') |
OR | the OR function returns TRUE if any of its arguments evaluate to TRUE, and returns FALSE if all of its arguments evaluate to FALSE. | OR(Condition 1, Condition 2) | Condition 1: This represents the first condition you want to evaluate. | OR(true, false) = true |
DATE_DIFF | the DATE DIFF function Given a date unit to measure the difference between two dates, the first argument accepts ('year', 'month', 'week', 'day', 'hour', 'minute', 'seconds') calculates and returns the number of units from the second argument to the third. | DATE_DIFF(Text, Date, Date) | Unit of Measurement: This is the unit of time that you want to measure the difference in between the two dates. | DATE_DIFF('yy', TODATE('2000-01-01', 'YYYY-MM-DD'), TODATE('2020-01-01', 'YYYY-MM-DD')) = 20 |
DATETIME_FORMAT | the DATETIME FORMAT function Converts the date to text given a way of formatting the date. | DATETIME_FORMAT(Date, Text) | Date: This is the original date that you want to convert into text. | DATETIME_FORMAT('2024-01-01, 'YYYY') = 2024 |
DAY | the DAY function Returns the day of the month as a number between 1 to 31 from the argument. | DAY(Date) | Date: This is the specific date you want to extract the day from. | DAY(TODATE('20210101', 'YYYYMMDD')) = 1 |
MONTH | the MONTH function Returns the number of months in the provided date. | MONTH(Date) | Date: This is the specific date you want to extract the month from. | MONTH(TODATE("2021-12-12", "YYYY-MM-DD")) = 12 |
SECONED | the SECONED function Returns the number of seconds in the provided date. | SECONEDDate) | Date: This is the date and time you want to analyze. | SECONED("2024-01-01 08:34:02) = 2 |
TODATE | the TODATE function Returns the first argument converted into a date given a date format string as the second argument. | TODATE(Text, Text) | Text: This is the text you want to convert into a date. | TODATE('20210101', 'YYYYMMDD') |
YEAR | the YEAR function Returns only the year in the provided date. | YEAR(Date) | Date: This is the specific date you want to extract the year from. | YEAR('2024-01-01') = 2024 |
DATE_INTERVAL | the DATE INTERVAL function Returns the date interval corresponding to the provided argument. | DATE_INTERVAL(Text) | Text: This is the input that determines the duration or period of time for the date interval. | DATE_INTERVAL('1 year') |
ADD | the ADD function Returns the two number added together. | ADD(Number, Number) | Number 1: This is the first number you want to add. | ADD(1, 2) = 3 |
FIELD | the FIELD function Returns the field named by the single text argument. | FIELD('Field Name') | Field Name: This is the name of the field you want to retrieve information from. | FIELD('my text field') = 'flag' |
LOOKUP | the LOOKUP function Looks up the values from a field in another table for rows in a link row field. The first argument should be the name of a link row field in the current table and the second should be the name of a field in the linked table. | LOOKUP('Link Row Field Name', 'Field Name in Other Table') | Link Row Field Name: This is like a special label in our table that helps us connect or link to another table. | LOOKUP('Link Row Field Name', 'first name') = lookup('Link Row Field Name', 'last name') |
MINUS | the MINUS function Returns the two number subtracted. | MINUS(Number, Number) | Number 1: This is the first number you want to subtract from. | MINUS(3, 1) = 2 |
ROW_ID | the ROW ID function Returns the rows unique identifying number. | ROW_ID() | None: This function doesn't require any additional attributes or inputs. | ROW_ID('Row ', ROW_ID()) = Row 1 |
WHEN_EMPTY | the WHEN EMPTY function If the first input is calculated to be empty the second input will be returned instead, otherwise if the first input is not empty the first will be returned. | WHEN_EMPTY(Field, Default Value) | Field: This is the piece of information we're checking. | WHEN_EMPTY(FIELD('a'), 'default') |
ANY | the ANY function Returns TRUE if any one of the provided looked up values is TRUE, FALSE if they are all FALSE. | ANY(Lookup in Condition) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | ANY(FIELD('my lookup') = 'test') |
AVERAGE | the AVERAGE function Averages all of the values and returns the result. | AVERAGE(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | AVERAGE(LOOKUP('link field', 'number field')) |
COUNT | the COUNT function Returns the number of items in its first argument. | COUNT(Field) | Field: This is the area or category where you want to count items. | COUNT(FIELD('my link row FIELD')) |
EVERY | the EVERY function Returns true if every one of the provided looked up values is TRUE, FALSE otherwise. | EVERY(Lookup in Condition) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | EVERY(FIELD('my lookup') = 'test') |
FILTER | the FILTER function Filters down an expression involving a lookup/link field reference or a lookup function call. | FILTER(Lookup, Condition) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | SUM(FILTER(LOOKUP('link field', 'number field'),LOOKUP('link field', 'number field') > 10)) |
JOIN | the JOIN function Concats all of the values from the first input together using the values from the second input. | JOIN(Lookup, Text) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | JOIN(LOOKUP('link field', 'number field'),'_')= 'First Element_Second Element' |
MAX | the MAX function Returns the largest number from all the looked up values provided. | MAX(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | MAX(LOOKUP('link field', 'number field')) |
MIN | the MIN function Returns the smallest number from all the looked up values provided. | MIN(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | MIN(LOOKUP('link field', 'number field')) |
STDDEV_POP | the STDDEV POP function Calculates the population standard deviation of the values and returns the result. The population standard deviation should be used when the provided values contain a value for every single piece of data in the population. | STDDEV_POP(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | STDDEV_POP(LOOKUP('link field', 'number field')), |
STDDEV_SAMPLE | the STDDEV SAMPLE function Calculates the sample standard deviation of the values and returns the result. The sample deviation should be used when the provided values are only for a sample or subset of values for an underlying population. | STDDEV_SAMPLE(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | STDDEV_SAMPLE(lookup('link field', 'number field')) |
SUM | the SUM function Sums all of the values and returns the result. | SUM(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | SUM(LOOKUP('link field' ,'number field')) |
VARIANCE_POP | the VARUANCE POP function Calculates the population variance of the values and returns the result. The population variance should be used when the provided values contain a value for every single piece of data in the population. | VARIANCE_POP(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | VARIANCE_POP(LOOKUP('link field', 'number field')) |
VARIANCE_SAMPLE | the VARIANCE SAMPLE function Calculates the sample variance of the values and returns the result. The sample variance should be used when the provided values are only for a sample or subset of values for an underlying population. | VARIANCE_SAMPLE(Lookup) | Lookup: function Looks up the values from a field in another table for rows in a link row field. | VARIANCE_SAMPLE(LOOKUP('link field', 'number field')) |
TODAY | the TODAY function Returns the current date in utc. | TODAY() | None: This function doesn't require any additional attributes or inputs. | TODAY() > TODATE('2021-12-12' ,'YYYY-MM-DD')= treu |
TODATE_TZ | the TODATE_TZ function Returns the first argument converted into a date given a date format string as the second argument and the timezone provided as third argument. | TODATE_TZ(Text, Text, Text) | Text: This is the text you want to convert into a date. | TODATE_TZ('20210101', 'YYYYMMDD', 'Europe/Amsterdam') |
NOW | the NOW function Returns the current date and time in utc. | NOW() | None: This function doesn't require any additional attributes or inputs. | NOW() > TODATE('2021-12-12 13:00:00','YYYY-MM-DD HH24:MI:SS') |
DATETIME_FORMAT_TZ | the DATETIME FORMAT TZ Converts the date to text given a way of formatting the date in the specified timezone. | DATETIME_FORMAT_TZ(Date, Text, Text) | Date: This is the original date that you want to convert into text. | DATETIME_FORMAT_TZ(FIELD('date field'), 'YYYY-MM-DD HH24:MI', 'Europe/Amsterdam') |
IS_NULL | the IS NULL Returns true if the argument is null, false otherwise. only works with numbers | IS_NULL(Value) | Value: This is the input you want to check. | IS_NULL('10') |
WHEN_NAN | the WHEN NAN Returns the first argument if it's not 'NaN'. Returns the second argument if the first argument is 'NaN' | WHEN_NAN(Number, Fallback) | Number: This is the value or calculation result that you want to check. | WHEN_NAN(1 / 0, 4) = 4 |
SQRT | the SQRT function Returns the square root of the argument provided. | SQRT(Number) | Number: This is the value for which you want to find the square root | SQRT(9) = 3 |
SIGN | the SIGN function Returns 1 if the argument is a positive number, -1 if the argument is a negative one, 0 otherwise. | SIGN(Number) | Number: This is the value that you want to evaluate. | SIGN(2.1234) = 1 |
POWER | the POWER function Returns the result of the first argument raised to the second argument exponent. | POWER(Number, Number) | Number: This is the base number that you want to raise to a power. | POWER(3, 2) = 9 |
MOD | the MOD function Returns the remainder of the division between the first argument and the second argument. | MOD(Number, Number) | Number 1 (Dividend): This is the number you want to divide. | MOD(5, 2) = 1 |
LOG | the LOG function returns the exponent to which the first argument must be raised to produce the second argument. | LOG(Number, Number) | Number: This is the number you want to find the exponent for. | LOG(3, 9) = 2 |
IS_NAN | the IS NAN function Returns true if the argument is 'NaN', returns false otherwise. | IS_NAN(Number) | Number: This is the value that you want to check. | IS_NAN(1 / 0) = true |
FLOOR | the FLOOR function Returns the largest integer that is less than or equal the argument number provided. | FLOOR(Number) | Number: This is the value for which you want to find the largest whole number that is less than or equal to it. | FLOOR(1.49) = 1 |
EXP | the EXP function returns the result of the constant e ≈ 2.718 raised to the argument number provided. | EXP(Number) | Number: This is the value that you want to raise "e" to the power of. | EXP(1.000) = 2.718 |
EVEN | the EVEN function Returns true if the argument provided is an even number, false otherwise. | EVEN(Number) | Number: This is the value you want to check. | EVEN(2) = true |
CEIL | the CEIL function Returns the smallest integer that is greater than or equal the argument number provided. | CEIL(Number) | Number: This is the value for which you want to find the smallest integer greater than or equal to it. | CEIL(1.49) = 2 |
ABS | the ABS function Returns the absolute value for the argument number provided. | ABS(Number) | Number: This is the value for which you want to find the absolute value. | ABS(1.49) = 1.49 |
