> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported table calculation functions

> Learn more about the functions Omni supports for creating table calculations.

For general information about table calculations, such as how they work and how you can create them, refer to [Using table calculations](/analyze-explore/calculations).

## AI functions

<Note>
  This feature is currently in beta and only supported for Snowflake and Databricks databases. Reach out to Omni support to have this feature enabled.
</Note>

| Name                                                           | Description                                                                                            |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [AI\_CLASSIFY](/analyze-explore/calculations/ai#ai_classify)   | Classifies text into one of the provided categories.                                                   |
| [AI\_COMPLETE](/analyze-explore/calculations/ai#ai_complete)   | Generates a text completion from a prompt. The model is selected automatically by the warehouse.       |
| [AI\_EXTRACT](/analyze-explore/calculations/ai#ai_extract)     | Extracts structured data from text based on specified labels.                                          |
| [AI\_SENTIMENT](/analyze-explore/calculations/ai#ai_sentiment) | Analyzes the sentiment of text, returning a score indicating positive, negative, or neutral sentiment. |
| [AI\_SUMMARIZE](/analyze-explore/calculations/ai#ai_summarize) | Summarizes text content into a shorter form.                                                           |

## Date and time functions

| Name                                                               | Description                                                                              |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| [DATE](/analyze-explore/calculations/date-time#date)               | Creates a date from day, month, and year components.                                     |
| [DATEDIF](/analyze-explore/calculations/date-time#datedif)         | Finds the difference between two dates in specified units, such as days.                 |
| [DAY](/analyze-explore/calculations/date-time#day)                 | Returns the day of the month from a date.                                                |
| [DAYS](/analyze-explore/calculations/date-time#days)               | Finds the difference in days between two dates.                                          |
| [EOMONTH](/analyze-explore/calculations/date-time#eomonth)         | Returns the date of the last day of a month from a date or datetime value.               |
| [HOUR](/analyze-explore/calculations/date-time#hour)               | Returns the hour as a number from 0 to 23.                                               |
| [MINUTE](/analyze-explore/calculations/date-time#minute)           | Returns the minute as a number from 0 to 59.                                             |
| [MONTH](/analyze-explore/calculations/date-time#month)             | Returns the month (1-12) from a date.                                                    |
| [NETWORKDAYS](/analyze-explore/calculations/date-time#networkdays) | Returns the number of whole working days between a start and end date.                   |
| [NOW](/analyze-explore/calculations/date-time#now)                 | Returns the current date and time as a date-time value.                                  |
| [SECOND](/analyze-explore/calculations/date-time#second)           | Returns the second as a number from 0 to 59.                                             |
| [TODAY](/analyze-explore/calculations/date-time#today)             | Returns the current date as a date value.                                                |
| [WEEKDAY](/analyze-explore/calculations/date-time#weekday)         | Returns the day of the week as a number from `1` to `7`, where `1` is equal to `Sunday`. |
| [WEEKNUM](/analyze-explore/calculations/date-time#weeknum)         | Returns a number representing the week of the year where the provided date falls.        |
| [YEAR](/analyze-explore/calculations/date-time#year)               | Returns the year from a date.                                                            |

## Logic functions

| Name                                                       | Description                                                                                                                                                                       |
| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AND](/analyze-explore/calculations/logic#and)             | Returns true if all of the provided arguments are logically true.                                                                                                                 |
| [BITAND](/analyze-explore/calculations/logic#bitand)       | Returns the bitwise boolean AND of two numbers.                                                                                                                                   |
| [BITOR](/analyze-explore/calculations/logic#bitor)         | Returns the bitwise boolean OR of two numbers.                                                                                                                                    |
| [BITRSHIFT](/analyze-explore/calculations/logic#bitrshift) | Shifts the bits of the input a certain number of places to the right.                                                                                                             |
| [BITXOR](/analyze-explore/calculations/logic#bitxor)       | Returns a number that's the result of performing an `XOR` function at each bit of the two numbers given as arguments.                                                             |
| [IF](/analyze-explore/calculations/logic#if)               | Returns the second argument if a logical expression is true and the third argument if the expression is false.                                                                    |
| [IFERROR](/analyze-explore/calculations/logic#iferror)     | Returns the specified value if the formula returns null due to an error; otherwise returns the result of the formula. If the second argument is absent, a blank will be returned. |
| [IFNA](/analyze-explore/calculations/logic#ifna)           | Returns the specified value if the formula returns null; otherwise returns the result of the formula.                                                                             |
| [IFS](/analyze-explore/calculations/logic#ifs)             | Evaluates multiple conditions and returns a value that corresponds to the first true condition.                                                                                   |
| [ISBLANK](/analyze-explore/calculations/logic#isblank)     | Returns true if a value is blank.                                                                                                                                                 |
| [ISNUMBER](/analyze-explore/calculations/logic#isnumber)   | Returns true if a value is a number.                                                                                                                                              |
| [NOT](/analyze-explore/calculations/logic#not)             | Returns the opposite of a logical value.                                                                                                                                          |
| [OR](/analyze-explore/calculations/logic#or)               | Returns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false.                                                 |

## Math and number functions

| Name                                                                   | Description                                                                                                                           |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [ABS](/analyze-explore/calculations/math-number#abs)                   | Returns the absolute value of a number.                                                                                               |
| [ACOS](/analyze-explore/calculations/math-number#acos)                 | Returns the arccosine of a number.                                                                                                    |
| [ATAN](/analyze-explore/calculations/math-number#atan)                 | Returns the arctangent of a number. Specifically, this function returns the angle whose tangent is the specified number.              |
| [AVERAGE](/analyze-explore/calculations/math-number#average)           | Averages a list of numbers.                                                                                                           |
| [AVERAGEIFS](/analyze-explore/calculations/math-number#averageifs)     | Returns the average of a range depending on specified criteria.                                                                       |
| [CEILING](/analyze-explore/calculations/math-number#ceiling)           | Rounds numbers up to the nearest integer multiple of (optional) specified significance.                                               |
| [CORREL](/analyze-explore/calculations/math-number#correl)             | Returns the correlation coefficient of the `array1` and `array2` cell ranges.                                                         |
| [COS](/analyze-explore/calculations/math-number#cos)                   | Returns the cosine of an angle, in radians.                                                                                           |
| [COT](/analyze-explore/calculations/math-number#cot)                   | Returns the cotangent of an angle, in radians.                                                                                        |
| [COUNT](/analyze-explore/calculations/math-number#count)               | Counts the number of cells that contain values in the column. When used, the formula will be applied to the entire column.            |
| [COUNTA](/analyze-explore/calculations/math-number#counta)             | Counts the number of cells that are not empty. The value can be a reference to a cell (`E1`), a range (`B4:B9`), or a column (`C:C`). |
| [COUNTIF](/analyze-explore/calculations/math-number#countif)           | Counts the number of cells that contain values that meet a given criteria.                                                            |
| [COUNTIFS](/analyze-explore/calculations/math-number#countifs)         | Counts the number of cells that contain values that meet given criteria.                                                              |
| [COVAR](/analyze-explore/calculations/math-number#covar)               | Returns covariance, the average of the products of deviations. Equivalent to `COVAR.S`.                                               |
| [COVARIANCE.P](/analyze-explore/calculations/math-number#covariance-p) | Returns covariance, the average of the products of deviations of a population.                                                        |
| [DEGREES](/analyze-explore/calculations/math-number#degrees)           | Converts radians to degrees.                                                                                                          |
| [EXP](/analyze-explore/calculations/math-number#exp)                   | Returns `e` raised to the power of a given number.                                                                                    |
| [FLOOR](/analyze-explore/calculations/math-number#floor)               | Rounds a number down to the nearest integer multiple of specified significance.                                                       |
| [INT](/analyze-explore/calculations/math-number#int)                   | Rounds a number down to the nearest integer that is less than or equal to it. Alias for `FLOOR`.                                      |
| [INTERCEPT](/analyze-explore/calculations/math-number#intercept)       | Returns the intercept of the linear regression line through data points in X and Y data points.                                       |
| [LARGE](/analyze-explore/calculations/math-number#large)               | Returns the `nth` largest value in a data set.                                                                                        |
| [LN](/analyze-explore/calculations/math-number#ln)                     | Returns the natural logarithm of a number.                                                                                            |
| [LOG](/analyze-explore/calculations/math-number#log)                   | Returns the logarithm of a number to the specified base.                                                                              |
| [LOG10](/analyze-explore/calculations/math-number#log10)               | Returns the base-10 logarithm of a number.                                                                                            |
| [MAX](/analyze-explore/calculations/math-number#max)                   | Returns the maximum value in a data set.                                                                                              |
| [MAXIFS](/analyze-explore/calculations/math-number#maxifs)             | Returns the maximum value in a range of cells, filtered by a list of criteria.                                                        |
| [MEDIAN](/analyze-explore/calculations/math-number#median)             | Returns the median number in a set.                                                                                                   |
| [MIN](/analyze-explore/calculations/math-number#min)                   | Returns the minimum value in a data set.                                                                                              |
| [MINIFS](/analyze-explore/calculations/math-number#minifs)             | Returns the minimum value in a range of cells, filtered by a list of criteria.                                                        |
| [MOD](/analyze-explore/calculations/math-number#mod)                   | Returns the remainder of a division.                                                                                                  |
| [OMNI\_RANK](/analyze-explore/calculations/math-number#omni_rank)      | Returns the rank of a number in a list of numbers, with row or column direction.                                                      |
| [MODE](/analyze-explore/calculations/math-number#mode)                 | Returns the most common number in a set.                                                                                              |
| [RAND](/analyze-explore/calculations/math-number#rand)                 | Generates a random number between 0 and 1.                                                                                            |
| [RANK](/analyze-explore/calculations/math-number#rank)                 | Returns the rank of a number in a list of numbers.                                                                                    |
| [ROUND](/analyze-explore/calculations/math-number#round)               | Rounds a number to a specified number of digits.                                                                                      |
| [ROUNDDOWN](/analyze-explore/calculations/math-number#rounddown)       | Rounds a number down, towards zero, to a specified number of digits.                                                                  |
| [ROUNDUP](/analyze-explore/calculations/math-number#roundup)           | Rounds a number up, away from zero, to a specified number of digits.                                                                  |
| [SLOPE](/analyze-explore/calculations/math-number#slope)               | Returns the slope of the linear regression line through data points in Ys and Xs.                                                     |
| [SMALL](/analyze-explore/calculations/math-number#small)               | Returns the nth smallest value in a data set.                                                                                         |
| [SQRT](/analyze-explore/calculations/math-number#sqrt)                 | Returns a positive square root.                                                                                                       |
| [STDEV](/analyze-explore/calculations/math-number#stdev)               | Estimates the standard deviation based on a population of values.                                                                     |
| [STDEV.P](/analyze-explore/calculations/math-number#stdev-p)           | Estimates the standard deviation based on an entire population.                                                                       |
| [SUM](/analyze-explore/calculations/math-number#sum)                   | Adds all the numbers in a range of cells.                                                                                             |
| [SUMIF](/analyze-explore/calculations/math-number#sumif)               | Adds the cells specified by a given criteria.                                                                                         |
| [SUMIFS](/analyze-explore/calculations/math-number#sumifs)             | Adds the cells specified by multiple criteria.                                                                                        |
| [SUMPRODUCT](/analyze-explore/calculations/math-number#sumproduct)     | Returns the sum of the products of corresponding array components.                                                                    |
| [TRUNC](/analyze-explore/calculations/math-number#trunc)               | Truncates a number to an integer by removing the decimal portion of a number.                                                         |
| [VALUE](/analyze-explore/calculations/math-number#value)               | Converts a text argument to a number.                                                                                                 |
| [VAR](/analyze-explore/calculations/math-number#var)                   | Calculates the variance based on a sample of values.                                                                                  |
| [VAR.P](/analyze-explore/calculations/math-number#var-p)               | Returns the variance of a population.                                                                                                 |

## Position functions

| Name                                                              | Description                                                                                                        |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [INDEX](/analyze-explore/calculations/position#index)             | Returns the content of a cell, specified by row and column offset.                                                 |
| [MATCH](/analyze-explore/calculations/position#match)             | Returns the relative position of an item in a range that matches a specified value.                                |
| [PIVOT](/analyze-explore/calculations/position#pivot)             | Returns a value from a specific pivot in the results table.                                                        |
| [PIVOTINDEX](/analyze-explore/calculations/position#pivotindex)   | Returns the index of the current pivot.                                                                            |
| [PIVOTOFFSET](/analyze-explore/calculations/position#pivotoffset) | Returns a pivot value offset from the current pivot column.                                                        |
| [PIVOTROW](/analyze-explore/calculations/position#pivotrow)       | Returns the values of a specified row in a pivot.                                                                  |
| [ROW](/analyze-explore/calculations/position#row)                 | Returns the current row number.                                                                                    |
| [SWITCH](/analyze-explore/calculations/position#switch)           | Evaluates an expression against a list of values and returns the result corresponding to the first matching value. |
| [VLOOKUP](/analyze-explore/calculations/position#vlookup)         | Searches for a value in a range and returns the value in the specified column.                                     |
| [XLOOKUP](/analyze-explore/calculations/position#xlookup)         | Searches for a value in a specified range in another query/tab and returns the corresponding value from the range. |

## Text functions

| Name                                                          | Description                                                                                                            |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [CHAR](/analyze-explore/calculations/text#char)               | Returns the character specified by a number.                                                                           |
| [CONCAT](/analyze-explore/calculations/text#concat)           | Concatenates (combines) any number of strings into a single string.                                                    |
| [CONCATENATE](/analyze-explore/calculations/text#concatenate) | Concatenates (combines) any number of strings into a single string. Alias for `CONCAT`.                                |
| [CLEAN](/analyze-explore/calculations/text#clean)             | Returns text with the non-printable ASCII characters removed. Unicode characters that aren't in ASCII are not removed. |
| [EXACT](/analyze-explore/calculations/text#exact)             | Tests whether two text strings are exactly the same.                                                                   |
| [FIND](/analyze-explore/calculations/text#find)               | Returns the position of one string inside another.                                                                     |
| [LEFT](/analyze-explore/calculations/text#left)               | Returns the specified number of characters from the start of a text string.                                            |
| [LEN](/analyze-explore/calculations/text#len)                 | Returns the length (number of characters) of a string.                                                                 |
| [LOWER](/analyze-explore/calculations/text#lower)             | Converts text to lowercase.                                                                                            |
| [MID](/analyze-explore/calculations/text#mid)                 | Returns a specific number of characters from a text string starting at the specified position.                         |
| [PROPER](/analyze-explore/calculations/text#proper)           | Capitalizes the first letter of each word in a text string.                                                            |
| [REPLACE](/analyze-explore/calculations/text#replace)         | Replaces characters in a string with new text.                                                                         |
| [RIGHT](/analyze-explore/calculations/text#right)             | Returns the specified number of characters from the end of a text string.                                              |
| [SEARCH](/analyze-explore/calculations/text#search)           | Finds one text value within another, ignoring case.                                                                    |
| [SUBSTITUTE](/analyze-explore/calculations/text#substitute)   | Substitutes new text for old text in a string.                                                                         |
| [TRIM](/analyze-explore/calculations/text#trim)               | Removes leading, trailing, and repeated spaces from text.                                                              |
| [T](/analyze-explore/calculations/text#t)                     | Returns arguments as text.                                                                                             |
| [TEXT](/analyze-explore/calculations/text#text)               | Converts a number into text according to a specified format.                                                           |
| [UPPER](/analyze-explore/calculations/text#upper)             | Converts text to uppercase.                                                                                            |
