Formulas

Adding formula column

Formula

1. Click on '+' (Add column)

2. Populate column Name

3. Select column Type as 'Formula'

4. Insert required formula

  • Can use column names in equation
  • Can use explicit numberical values/ strings as needed
  • Table below lists supported formula & associated syntax
  • Nested formula (formula equation referring to another formula column) are not supported

5. Click on 'Save'

Available Formula Features

Numeric Functions

NameSyntaxSampleOutput
ABSABS(value)ABS(Column)Absolute value of the input parameter
ADDADD(value1,[value2,...])ADD(Column1, Column1)Sum of input parameters                        
AVGAVG(value1,[value2,...])AVG(Column1, Column1)Average of input parameters                
CEILINGCEILING(value)CEILING(Column)Rounded next largest integer value of input parameter
EXPEXP(value)EXP(Column)Exponential value of input parameter (e^x)
FLOORFLOOR(value)FLOOR(Column)Rounded largest integer less than or equal to input parameter
INTINT(value)INT(Column)Integer value of input parameter                
LOGLOG([base], value)LOG(10, Column)Logarithm of input parameter to the base (default = e) specified
MAXMAX(value1,[value2,...])MAX(Column1, Column2, Column3)Maximum value amongst input parameters
MINMIN(value1,[value2,...])MIN(Column1, Column2, Column3)Minimum value amongst input parameters
MODMOD(value1, value2)MOD(Column, 2)Remainder after integer division of input parameters
POWERPOWER(base, exponent)POWER(Column, 3)base to the exponent power, as in base^exponent
ROUNDROUND(value)ROUND(Column)Nearest integer to the input parameter
SQRTSQRT(value)SQRT(Column)Square root of the input parameter                
                                                                                                                                                                                                                                                                                                                          

Numeric Operators

OperatorSampleDescription
+column1 + column2 + 2Addition of numeric values
-column1 - column2Subtraction of numeric values
*column1 * column2Multiplication of numeric values
/column1 / column2Division of numeric values

To change order of arithmetic operation, use round bracket parantheses ()
Example: (column1 + (column2 * column3) / (3 - column4 ))

String Functions

NameSyntaxSampleOutput
CONCATCONCAT(str1, [str2,...])CONCAT(fName, ' ', lName)Concatenated string of input parameters
LEFTLEFT(str1, [str2,...])LEFT(Column, 3)n characters from the beginning of input parameter
LENLEN(str)LEN(Title)Input parameter charachter length                      
LOWERLOWER(str)LOWER(Title)Lower case converted string of input parameter
MIDSUBTR(str, position, [count])MID(Column, 3, 2)Alias for SUBSTR                                            
REPEATREPEAT(str, count)REPEAT(Column, 2)Specified copies of the input parameter string concatenated together
REPLACEREPLACE(str, srchStr, rplcStr)REPLACE(Column, 'int', 'num')String, after replacing all occurrences of srchStr with rplcStr
RIGHTRIGHT(str, count)RIGHT(Column, 3)n characters from the end of input parameter
SEARCHSEARCH(str, srchStr)SEARCH(Column, 'str')Index of srchStr specified if found, 0 otherwise
SUBSTRSUBTR(str, position, [count])SUBSTR(Column, 3, 2)Substring of length 'count' of input string, from the postition specified
TRIMTRIM(str)TRIM(Title)Remove trailing and leading whitespaces from input parameter
UPPERUPPER(str)UPPER(Title)Upper case converted string of input parameter
                                                                                                                                                                                                                                                                                                                          

Logical Operators

OperatorSampleDescription
<column1 < column2Less than
>column1 > column2Greater than
<=column1 <= column2Less than or equal to
>=column1 >= column2Greater than or equal to
==column1 == column2Equal to
!=column1 != column2Not equal to

Conditional Expressions

NameSyntaxSampleOutput
IFIF(expr, successCase, [failCase])IF(Column > 1, Value1, Value2)successCase if expr evaluates to TRUE, elseCase otherwise
SWITCHSWITCH(expr, [pattern, value, ..., default])SWITCH(Column1, 1, 'One', 2, 'Two', '--')Switch case value based on expr output
ANDAND(expr1, [expr2,...])AND(Column > 2, Column < 10)TRUE if all expr evaluate to TRUE                                            
OROR(expr1, [expr2,...])OR(Column > 2, Column < 10)TRUE if at least one expr evaluates to TRUE
                                                                                                                                                                                                                                                                                                                          

Logical operators, along with Numerical operators can be used to build conditional expressions.

Example:
IF (marksSecured > 80, "GradeA", "GradeB")
SWITCH (quarterNumber,
1, 'Jan-Mar',
2, 'Apr-Jun',
3, 'Jul-Sep',
4, 'Oct-Dec',
'INVALID')