Table calculations in Omni
What are functions?
What are functions?
Functions are predefined formulas designed to make calculations on values easier. For example:
What are arguments?
What are arguments?
Some functions can accept arguments, which is the input or information provided to the function. In the following example, the arguments are Arguments can be several types, which can be thought of as the compositional building blocks of calculations:
1, 2, 3:-
String literals - Strings of text, which must be wrapped in double quotes. For example:
"Hello, Blobby!" -
Number literals - Numbers, such as
1or14. Can be used alone or as arguments. -
Logical literals - Boolean values (
TRUE,FALSE). Note: Must be all caps or the values will be interpreted as a cell reference. -
Unary Operators / Negation - Negates (
-) or adds (+) a value. Can be thought of as operators with only a right operand. For example:Note: The+operator can also be used as a unary. However, Omni typically ignores it because+1and1are logically equivalent. -
Cell references - Points to a specific cell in a dataset. The row can be omitted to reference only the column.
Omni interprets cell references relative to the first row of data. Calculations will be applied to all following rows with the number changed to offset how many rows down you are.
-
Cell range references - Compound cell reference that describes a span between one cell and another. Can be used to reference an entire column or a subset of the column’s data. Note: Cell ranges are inclusive.
What functions does Omni support?
What functions does Omni support?
Refer to the Omni supported functions reference for a list of the functions Omni currently supports.
Are Omni functions the same as Excel or Google Sheets?
Are Omni functions the same as Excel or Google Sheets?
Omni aims to be compatible with Excel or Google Sheets wherever possible. The Google Sheets documentation included in the Omni supported functions reference is useful for enhancing your understanding of Omni’s functions.Note: For some functions, there are some differences between Omni’s implementation and Google Sheets’. Refer to the reference for the specific Omni function for more information.
What are the OMNI_PIVOT functions in the query's SQL?
What are the OMNI_PIVOT functions in the query's SQL?
There are some other functions you may see in the SQL that are not meant for end-user use, but help make the SQL blocks easier to parse in normal usage:
The

OMNI_PIVOT_ROW(dimensions) and OMNI_PIVOT(column_limit, pivots) structure the pivot table experience.OMNI_PIVOT_ROWsets the query columns outside the pivotOMNI_PIVOTsets the query columns to pivot, along with a limit on columns
Creating table calculations
There are a few ways to create calculations in Omni:- Quick calculations, which allow you to create calculations like a running total or % of previous with just a few clicks
- Using AI, which can help you get started quickly
- Manually, which allows you to iterate and build at your own pace
Before you get started:
- Make sure that the query includes the fields you want to use in the calculation
- Keep in mind that all alphabetic characters must be wrapped in double quotes (
") unless referring to a specific cell or column. For example:"Hello, Blobby!". Single quotes are not valid for wrapping strings in Omni.
Quick calculations
Quick calculations, such as percent of total, can be used on numeric data in a workbook results table in the query builder or SQL editor. They can also be used across pivots. For example, a running total for a row. To create a quick calculation:-
Click the â ‡ (three dots icon) in the header of a numeric column in the results table, then Calculations:

-
Select an option from the Calculations menu. A new column will be created in the table:

<column_name> + <quick_calculation>, but you can rename it if needed.
AI-generated
Short on time or not sure where to start? With Omni’s AI, you can write complex, Excel-like formulas using natural language. Having AI create calculated fields for you reduces the time you’d otherwise spend searching for the right syntax and iterating to get it just right. For more information, refer to the Creating AI formulas guide.Manually-created calculations
You can also manually create calculations in the results table of a query:-
Click the Add a column icon to first add a new column to the table. Note: The new column will be named
Calculationby default, but you can rename it.
-
In a cell or the function editor, enter
=to start building the calculation. Note: The calculation must start with an equals sign (=). -
Build the calculation using Omni’s supported functions. The following image shows an example of a
DATEDIFcalculation, which was used to calculate the number of days between theCreated AtandDelivered Atcolumns:
Renaming & formatting calculations
In the Options for the Results table, you can rename or change the formatting for calculations. You can also rename a calculation by double-clicking the column header and entering a new name:
Promoting table calculations
To reuse a calculation in a workbook, you can promote it to the workbook model. Click the ⠇ (three dots) in the calculation column’s header, then Promote to workbook:
Examples
Return null values
To return anull value, use 1/0 as the calculation. Nulls will display as blanks.

Total references
Using row and column totals can be effective for more complex calculations across rows or columns independently. These aggregates can be referenced in calculations when they are activated for queries, which you can do in the Options menu for the Results table.
- Column total
${users.count:column_total} - Row total -
${users.count:row_total} - Grand total (columns and rows, lower right) -
${users.count:grand_total}
- Column total
<ROW_LETTER>_TOTAL - Row total
<ROW_LETTER>_ROW_TOTAL - Grand total
<ROW_LETTER>GRAND_TOTAL
Free text values
Calculations can also contain free text - just leave out the equals sign when creating the calculation. When you don’t include the equals sign, Omni will not treat the cell’s value as a formula. To create this type of calculation, add a new column to the table and then enter text in the cells. Free-text values can be used to cross-reference columns or cells in other workbook tabs. To do this, create a new column, enter an equal sign, and ` (backtick) to pull up the tab names in the cell: