# Rollup

Rollups provide a quick and straightforward way to perform the following simple calculations:

| Calculation | Description             |
| ----------- | ----------------------- |
| **Count**   | count the number        |
| **Sum**     | calculating the sum     |
| **Average** | calculating the average |
| **Maximum** | determine the maximum   |
| **Minimum** | determine the minimum   |

{% hint style="warning" %}
**Relationship Requirement**

Rollups will work for data connected via relationships only, and not for reference fields.
{% endhint %}

## Rollup Calculations

Rollup calculations are performed in the following ways:

1. Manually by clicking the Calculate Now button
2. Every time the specified target field is modified
3. When a relationship is created or deleted

## Rollup Form

To create a new Rollup, open the YouDesign Command Settings -> Rollups from the Application Menu and click the New button.

**A** – Create a short description of what the rollup is about.

**B** – Specify the type of calculation (Sum, Count, Average) for the rollup.

**C** – Uncheck this field to deactivate the rollup.

**D** – Specify the target table to which the rollup is performed.

**E** – Specify the target field of the target table to which the rollup is performed to.

**F** – This choice list allows you to specify the direction of the relationship by specifying if the target table is the parent, child, or both. The latter one will allow the rollup to consider any direction of the relationship.

**G** – You can select a single or multiple data sources from which the data will be rolled up.

**H** – Enter the name of the Source field name, e.g., opex\_total. Please note that this field will not be visible when selecting the Count calculation type.

**I** – Leave this field empty to consider any relationship type, or specify here which relationship types should be considered.

![](/files/yhkrAnkmKHhFiSUkcOxh)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ins-pi.com/command/configuration/rollup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
