Date and time functions
Function | Formula | Arguments | Example |
DATE function | DATE(year, month, day) Converts integers representing the year, month, and day into a date |
| DATE(2000,01,01)=2000/01/01 |
DATEDIF function | DATEDIF(start date, end date, unit) Returns the number of days, number of months, or number of years between the start date and end date |
| DATEDIF("2000-01-01","2000-01-08","D")=7 |
DAY function | DAY(date value) The day for a specified date, returned in the format of an integer |
| DAY("2000-01-03")=3 |
DAYS function | DAYS(end date, start date) Returns the number of days between the start date and end date |
| DAYS("2000-01-08","2000-01-01")=7 |
EOMONTH function | EOMONTH(start date, number of months) Returns the number of the last day of the month that is a certain number of months away from the start date. |
| EOMONTH("2000-1-1", 1)=2000/2/28 EOMONTH("2000-3-1", -1)=2000/02/29 |
HOUR function | HOUR(time) The hour portion of a specified time, returned in the format of an integer |
| HOUR("11:40:59")=11 |
MINUTE function | MINUTE(time) The minute portion of a specified time, returned in the format of an integer |
| MINUTE("11:40:59")=40 |
MONTH function | MONTH(date value) The month of the specified date, returned in the format of an integer |
| MONTH("2000-12-01")=12 |
NETWORKDAYS function | NETWORKDAYS(start date, end date, [holidays]) Returns the net number of working days between the start date and end date |
| NETWORKDAYS("2000-01-01","2000-01-12")=8 |
NOW function | NOW() Returns the current date and time Note: For bases that are performing calculations on the server, the NOW function is updated every 5 minutes. You can check whether your base is performing calculations on the server by checking the status in the lower-left corner of the Performance Diagnostics window. | / | NOW()=2000/01/01 00:00 |
SECOND function | SECOND(time) The second portion of a specified time, returned in the format of an integer |
| SECOND("11:40:59")=59 |
TODAY function | TODAY() Returns the current date | / | TODAY()=2000/01/01 |
WEEKDAY function | WEEKDAY(date value, [type]) Returns the day of the week for the specified date, returned in the format of an integer |
| WEEKDAY("2000-01-01")=7 |
WEEKNUM function | WEEKNUM(date, [type]) Returns the week number for the specified date in the current year |
| WEEKNUM("2000-01-01")=1 |
WORKDAY function | WORKDAY(start date, number of days, [holidays]) Returns the end date based on the specified start date and the number of working days |
| WORKDAY("2000/01/01",7)=2000/01/11 |
YEAR function | YEAR(date value) The year portion of a specified date, returned in the format of an integer |
| YEAR("2000-01-01")=2000 |
DURATION function | DURATION(number_of_days, [number_of_hours], [number_of_minutes], [number_of_seconds]) Returns a date after adding or reducing the specified number of days, hours, minutes, or seconds | Number of days: The number of days in the duration Number of hours: The number of hours in the duration Number of minutes: The number of minutes in the duration Number of seconds: The number of seconds in the duration | Example: Return the date after adding 12 hours to the current time Formula: NOW()+DURATION(0, 12) =2023/06/05 22:00 Example: Return the date of the day before yesterday at 21:30 Formula: TODAY()-DURATION(1, 2, 30) =2023/06/03 21:30 |
Logical functions
Function | Formula | Arguments | Example |
AND function | AND(logical expression 1, [logical expression 2, ...]) When all arguments are TRUE, TRUE is returned; if any one of the arguments is FALSE, FALSE is returned |
| AND(1=1,1=2)=false |
CONTAIN function | CONTAIN(find range, [value to find, ...]) Assesses whether the find range contains the content to find Note: This function does not support contained text matching. For that, please use the CONTAINTEXT function |
| Example: Return Asia Pacific if the sales location is Japan or South Korea Formula: IF(CONTAIN([sales territory],"South Korea", "Japan"), "Asia-Pacific market", "Other") |
FALSE function | FALSE() Returns the logic value FALSE | / | FALSE()=false |
IF function | IF(evaluation condition, returned value when TRUE, [returned value when FALSE]) Returns one value when the evaluation condition is TRUE, and returns a different value when it is FALSE |
| IF(1=2, "Same", "Different")=Different |
IFBLANK function | IFBLANK(value, returned value if blank) Checks whether a target value is blank. If it is not blank, then the value itself is returned; otherwise, the value of the second argument is returned |
| IFBLANK([Member name], "Unfilled")=Member name Note: If the member name is blank, then Unfilled is returned |
IFERROR function | IFERROR(value, returned value if error) Checks whether the target value has an error. If there is no error, then the value itself is returned; otherwise, the value of the second argument is returned |
| IFERROR(2/0, "Error")=Error Note: If value is not an error, the value itself will be returned. If the value is an error, the specified value will be returned. |
IFS function | IFS(Condition 1, Value 1, [Condition 2, ...], [Value 2, ...]) Assesses whether one or multiple conditions are satisfied and returns the value corresponding to the first TRUE condition |
| IFS(A>=80,"Excellent",A>=60,"Pass",TRUE,"Fail") Note: If the value for A is greater than 80, then Excellent is returned; if it is greater than 60 , then the result is Pass for all other situations, the result is Fail. |
ISBLANK function | ISBLANK(value) Checks whether the target value is blank. If it is blank, the result is true; otherwise, it is false |
| Example: Evaluate whether the member name is blank Formula: ISBLANK([Member name]) |
ISERROR function | ISERROR Checks whether a certain value is an error value |
| ISERROR(Value) Note: If value is an error, true is returned. If value is not an error, false is returned. |
NOT function | NOT(logical function) Returns the opposite value of the specified logical value |
| NOT(TRUE)=false |
OR function | OR(logical expression 1, [logical expression 2, ...]) When all arguments are TRUE, TRUE is returned; if any one of the arguments is FALSE, FALSE is returned Returns TRUE when any one of the specified arguments is true; returns FALSE when all arguments are false |
| OR(1=2, 1=1)=true |
RECORD_ID function | RECORD_ID() Accesses a unique ID number recorded in a base | / | RECORD_ID() |
SWITCH function | SWITCH(expression, expression 1, value for expression 1, [expression 2 or default value, ...], [value for expression 2, ...]) Compares an expression against other expressions, returning specified values based on matching conditions |
| SWITCH([serial number],1,"Sunday",2,"Monday",3,"Tuesday","None") Note: If the serial number is 1, then the result returned is Sunday; if the serial number is 2, then the result returned is Monday; if the serial number is 3, then the result returned is Tuesday; for all other situations, the result is None |
TRUE function | TRUE() Returns the logical value TRUE | / | TRUE()=true |
CONTAINSALL function | CONTAINSALL(target_range, [target_value, ...]) Checks if the target range contains the target value |
| IF(Selected.CONTAINSALL("American Literature", "Linguistics", "British Culture"), "Yes", "No") Note: If "Selected" contains "American Literature", "Linguistics", and "British Culture", then "Yes" is returned. If not, "No" is returned. |
CONTAINSONLY function | CONTAINSONLY(target_range, [target_value, ...]) Checks if the target range contains only the target value |
| Example: Check if a multi-select question is correct Formula: IF(Answers.CONTAINSONLY("A", "B", "C"), "Correct", "Incorrect")=Correct |
ISNULL function | ISNULL(value) Checks whether the target value is empty. If it is empty, the result is true, otherwise it is false |
| ISNULL(Field 1) Note: If field 1 is empty, then true is returned, otherwise false is returned. |
RANDOMBETWEEN function | RANDOMBETWEEN(bottom, top, [update_continuously]) Returns a random integer between the numbers specified. |
| Example: Return a random number between 1 and 10 Formula: RANDOMBETWEEN(1, 10) |
RANDOMITEM function | RANDOMITEM(list, [update_continuously]) Returns a random item from a list |
| Example: Return a random member in a person field of a table Formula: Staff.Name.RANDOMITEM()=John Example: Return a random option for lunch Formula: LIST("Fried chicken", "Beef noodles", "Pizza", "Hot pot", "Burger").RANDOMITEM()=Pizza |
Text functions
Function | Formula | Arguments | Example |
CHAR function | CHAR(integer) Returns the Unicode character corresponding to the integer code |
| Example: Newline symbol Formula: CHAR(10)=\n |
CONCATENATE function | CONCATENATE(character string 1, [character string 2, ...]) Concatenates multiple character strings |
| CONCATENATE("Ba", "se")=Base |
CONTAINTEXT function | CONTAINTEXT(text, find text) Evaluates whether text contains the the specified subset of text |
| CONTAINTEXT("Base","se")=true |
FIND function | FIND(find value, find range, [start position]) Finds the specified value starting from the specified position, and returns the position where it first appears; if the value does not exist, it returns -1 |
| FIND("A", "Base")=2 |
HYPERLINK function | HYPERLINK(link address, [text to display]) Creates a hyperlink in a cell that redirects users to the target address |
| |
LEFT function | LEFT(character string, [number of characters]) Returns a substring extracted from the beginning of the specified character string |
| LEFT("Base", 2)=Ba |
LEN function | LEN(text) Returns the length of the specified character string |
| LEN("Base")=4 |
LOWER function | LOWER(text) Converts the letters in the character string to lower case |
| LOWER("ABC")=abc |
MID function | MID(character string, start position, length to extract) Returns the specified number of characters starting from the specified position in the character string |
| MID("Base", 1, 2)=Ba |
REPLACE function | REPLACE(text, position, length, new text) Replaces part of a character string with another character string |
| REPLACE("abcdefg", 1, 6, "xyz")=xyzg |
RIGHT function | RIGHT(character string, [number of characters]) Returns a substring extracted from the end of the specified character string |
| RIGHT("Base", 2)=se |
SUBSTITUTE function | SUBSTITUTE(text to search, search for, replace with, [occurence number]) Replaces text with new text |
| SUBSTITUTE("abcdefg", "cde", "xyz", 1)=abxyzfg |
SPLIT function | SPLIT(text, separator ) Splits the text with a separator |
| Example: Split text with a single-character separator Formula: SPLIT("a,b,c", ",") will result in: ["a", "b", "c"] Example: Split text with a multi-character separator Formula: SPLIT("a--c", "--") will result in: ["a", "c"] Example: Split text with a line break Formula: SPLIT([field containing line breaks], char(10)) |
TEXT function | TEXT(value, format) Converts integers into text based on the specified format |
| TEXT("2021-01-01", "ddd")=Friday |
TODATE function | TODATE(text) Convert text to date format |
| Example: Convert a date in YYYY-M-D text format to a date format Formula: TODATE("2023-6-5")=2023/06/05 00:00 |
TRIM function | TRIM(text) Removes leading, trailing, and repeated blank spaces in text |
| TRIM(" abc abc ")=abc abc |
UPPER function | UPPER(text) Converts the letters in the character string to upper case |
| UPPER("abc")=ABC |
ENCODEURL function | ENCODEURL(text) Return a URL-encoded string based on the given text, replacing certain non-alphanumeric characters with a percentage symbol (%) and hexadecimal numbers |
| ENCODEURL("Base formula")=Base%20formula |
FORMAT function | FORMAT(Template string, [Value, ...]) Concatenate strings by specifying a template string and its corresponding replacement values. |
| Example: Replace placeholders with corresponding fields to return a complete sentence. Formula: FORMAT("{1} scored {2} in the {3} test", Name, Score, Subject)=Josh scored 95 for the English test |
REGEXEXTRACT function | REGEXEXTRACT(text, regular_expression) Extracts the first match in a text string according to a regular expression. |
| Example: Extract an 11-digit mobile number from a text string Formula: REGEXEXTRACT("My phone number is 13812345678", "\d{11}")=13812345678 |
REGEXEXTRACTALL function | REGEXEXTRACTALL(text, regular_expression) Extracts all matches in a text string according to a regular expression. |
| Example: Extract all 11-digit mobile numbers in a text string Formula: REGEXEXTRACTALL("My phone number is 13812345678,Her phone number is 13987654321", "\d{11}")=13812345678,13987654321 |
REGEXMATCH function | REGEXMATCH(text, regular_expression) To determine whether a text string matches a regular expression. |
| Example: Check if a mobile number is 11-digit Formula: REGEXMATCH("13812345678", "^\d{11}$")=true |
REGEXREPLACE function | REGEXREPLACE(text, regular_expression, replacement) Replaces all parts of a text string with other text based on the regular expression. |
| Example: Replace the mobile number in a text string with asterisks Formula: REGEXREPLACE("My phone number is 13812345678", "\d{11}", "***********")=My phone number is *********** |
Math functions
Function | Formula | Arguments | Example |
ABS function | ABS(numerical value) Returns the absolute value for a numerical value |
| ABS(-2)=2 |
ACOS function | ACOS(numerical value) Returns the arc cosine of a value in radians |
| ACOS(-0.5)*180/PI()=120 |
ACOSH function | ACOSH(numerical value) Returns the inverse hyperbolic cosine of a value |
| ACOSH(1)=0 |
ASIN function | ASIN(numerical value) Returns the arcsine of a value in radians |
| ASIN(-0.5)*180/PI()=-30 |
ASINH function | ASINH(numerical value) Returns the inverse hyperbolic sine of a value in radians |
| ASINH(10)=2.99822295 |
ATAN function | ATAN(numerical value) Returns the arctangent of a value in radians. |
| ATAN(1)*180/PI()=45 |
ATAN2 function | ATAN2(X-coordinate value, Y-coordinate value) Returns the arctangent of the quotient of the X and Y coordinates |
| ATAN2(-1, -1)*180/PI()=-135 |
ATANH function | ATANH(numerical value) Returns the inverse hyperbolic tangent of a value |
| ATANH(0.76159416)=1.00000001 |
AVERAGE function | AVERAGE(value 1, [value 2, ...]) Returns the arithmetic average of an array |
| AVERAGE(2, 100)=51 |
COS function | COS(angle) Returns the cosine of an angle in radians |
| COS(60*PI()/180)=0.5 |
COSH function | COSH(numerical value) Returns the hyperbolic cosine of a value |
| COSH(4)=27.30823284 |
COUNTA function | COUNTA(value 1, [value 2, ...]) Counts the number of non-blank spaces in a data set |
| COUNTA([Attachment field])=Number of attachments in the attachment field |
COUNTIF function | Data range.COUNTIF(evaluation condition) Calculates the number of data points corresponding to the evaluation condition in a target field or array |
Note: When referencing data, use CurrentValue for individual instances | Example: Count the number of inventory categories with remaining inventory greater than 1000 in [Inventory summary table] Formula: [Inventory summary table].COUNTIF(CurrentValue.[remaining inventory]>1000) |
INT function | INT(numerical value) Returns the integer part of a number by rounding it down to the nearest integer |
| INT(8.9)=8 |
ISODD function | ISODD( numerical value ) Evaluates whether a number is odd, results in "ture" if it is, and "false" if it's not |
| ISODD(1)=true |
MAX function | MAX(value 1, [value 2, ...]) Returns the maxpoint in a numeric array |
| MAX(2, 100)=100 |
MIN function | MIN(value 1, [value 2, ...]) Returns the minpoint in a numeric array |
| MIN(2, 100)=2 |
MOD function | MOD(dividend, divisor) Returns the remainder of a division |
| MOD(3, 2)=1 |
PI function | PI() Returns the mathematical constant pi, accurate to 15 digits: 3.14159265358979 | / | PI()=3.141592654 |
POWER function | POWER(base number, exponent) Returns a number raised to the specified power |
| POWER(5,2)=25 |
QUOTIENT function | QUOTIENT(dividend, divisor) Returns the integer portion of a division result, discarding the remainder |
| QUOTIENT(5, 2)=2 |
ROUND function | ROUND(numerical value, number of digits) Rounds a numerical value to the specified number of digits or fewer |
| ROUND(99.44, 1)=99.4 |
ROUNDDOWN function | ROUNDDOWN(numerical value, number of digits) Rounds a numerical value to the specified number of digits, rounding down toward 0 |
| ROUNDDOWN(99.44, 1)=99.4 |
ROUNDUP function | ROUNDUP(numerical value, number of digits) Rounds a numerical value to the specified number of digits, rounding away from 0 |
| ROUNDUP(99.45, 1)=99.5 |
SIN function | SIN(angle) Returns the sine of an angle in radians |
| SIN(PI())=0 |
SINH function | SINH(numerical value) Returns the hyperbolic sine of a value |
| 2.868*SINH(0.0342*1.03)=0.101049063 |
SUM function | SUM(value 1, [value 2, ...]) Returns the sum of all numerical values in an array |
| SUM(1, 2)=3 |
SUMIF function | SUMIF(data range, evaluation condition) Returns the sum of the values that meet the specified criterion in a range |
Note: When referencing data, use CurrentValue for individual instances | Example: Tabulate the total sum for [sales volume] > 1000 in a [Sales summary table]. Formula: [Sales summary table].[sales volume].SUMIF(CurrentValue > 1000) Example: Tabulate the total sum of the [sales volume] for each [sales member] in [Sales summary table] (you will need to use FILTER) Formula: [Sales summary table].FILTER(CurrentValue.[sales member]= [sales member]).[sales volume].SUM() |
TAN function | TAN(angle) Returns the tangent of an angle in radians |
| TAN(45*PI()/180)=1 |
TANH function | TANH( numerical value ) Returns the hyperbolic tangent of a value |
| TANH(0)=0 |
VALUE function | VALUE(text) Converts a text string expressing an integer (such as the currency, date, or time formats) into an integer |
| VALUE("$50")=50 |
SEQUENCE function | SEQUENCE(start_number, end_number, [step]) Returns a list of sequential numbers in an array |
| SEQUENCE(1,10,2)=1,3,5,7,9 |
Position functions
Function | Formula | Arguments | Example |
Distance function | DISTANCE([location field 1], [location field 2]) Calculates the distance between two locations. By default, the unit is kilometers |
| Distance([company location],[attendance location]) |
List functions
Function | Formula | Arguments | Example |
ARRAYJOIN function | ARRAYJOIN(list, [separator]) Concatenates the values into a string using a specified separator |
| ARRAYJOIN(LIST("A","B","C"),"-")=A-B-C |
FILTER function | range.FILTER(condition) Filters records based off provided conditions. Must specify a field for results |
Note: When referencing data, use CurrentValue for individual instances | Example: Filter [SalesReport] for each representatives' sales volume Formula: [SalesReport].FILTER(CurrentValue.[Name]=[Name]).[Sales] |
FIRST function | FIRST(list) Returns the first value in a set or an array of data |
| LIST(1,3,5,7).FIRST()=1 LIST("B","A","S","E").FIRST()="B" |
LAST function | LAST(list) Returns the value in a set or an array of data |
| LIST(1,3,5,7).LAST()=7 LIST("B","A","S","E").LAST()="E" |
LIST function | LIST([value, ...]) Returns a list, which can contain values, and can also be a nested list |
| LIST(1,2,3)=1,2,3 |
LISTCOMBINE function | LISTCOMBINE(field 1, [field 2, ...]) Combines multiple arrays of fields, and displays the result |
| Example: Combine the two data arrays [1,2,3,4,5] and [2,3,4] Formula: LIST(1,2,3,4,5).ListCombine(2,3,4)=1,2,3,4,5,2,3,4 |
LOOKUP function | Lookup(value for lookup, field to match, field for returned result, [find model]) Looks up data based on the specified matching conditions |
1: Split find, which splits the multiple selections into single selections 0: Integrated find, which integrates the multiple selections as an array | Example: Find the sales volume of each member in the current [Member list] who is in the [Sales summary table] Formula: Lookup([Name], [Sales summary table].[Name], [Sales summary table].[Sales volume]) |
NTH function | List.NTH(Position) Returns the Nth item from a list or a set of data |
| LIST(1,3,5,7).NTH(2)=3 LIST("B","A","S","E").NTH(4)=E |
UNIQUE function | UNIQUE(Value 1, [Value 2, ...]) Returns a list of unique values from a list or a set of data |
| UNIQUE(1,2,2,4,5,5)=1,2,4,5 |