> ## 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.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.omni.co/feedback

```json
{
  "path": "/modeling/query-views/parameters/calculations",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# calculations

> Lists the calculations defined in the query.

## Syntax

```yaml theme={null}
query:
  calculations:
    <calculation_name>:
      sql: ${<view_name>.<field_name>} <OMNI SQL TABLE FUNCTION>
```

## Properties

<ParamField path="query" type="object[]">
  An object containing the individual parameters that make up a query view's query definition.

  <Expandable title="query properties" defaultOpen="true">
    <ParamField path="calculations" type="object">
      A list of calculation definitions, each with a `calculation_name` and child `sql` parameter.

      <Expandable title="calculations properties" defaultOpen="true">
        <ParamField path="calculation_name" type="object">
          The name of the calculation.

          <Expandable title="calculation_name properties" defaultOpen="true">
            <ParamField path="sql" type="string">
              An [Omni calculation expression](/analyze-explore/calculations/all). Specify fields as `view_name.field_name`.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Examples

```yaml title="Calculation that adds 2 to users.age" theme={null}
query:
  fields:
    users.age: age
    users.created_at[year]: created_at_year
    age_calc: age_plus_two
  calculations:
    age_calc:
      sql: ${users.age} OMNI_FX_PLUS 2
```
