> For the complete documentation index, see [llms.txt](https://docs.whaly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whaly.io/data-management/workbench/model-data/flow-models/flow-steps/rollup.md).

# Rollup

## What does it do?

Searches down a column of a dataset for a key and returns the selected aggregation of the value of a specified column in all rows found.

## How to use it?

In order to use the lookup step, click on the **Add Column** button and then **Rollup**&#x20;

<figure><img src="https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2F2DOrsMHSO9GWLnm3fMkx%2FScreen%20Cast%202022-09-08%20at%206.32.11%20PM.gif?alt=media&amp;token=95788b11-60f0-4aa9-92ce-c080dbd03f7e" alt=""><figcaption><p>Add Rollup</p></figcaption></figure>

## How to configure it?

<figure><img src="https://34758050-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MC1g4I2_CgXd0qAq1P7%2Fuploads%2FJ7GKURKtfHCz2Z7ZeJlb%2Fimage.png?alt=media&amp;token=2730fe46-91ad-451f-9847-1dd0613ebf21" alt=""><figcaption><p>Configuring Rollup</p></figcaption></figure>

To configure a roll you need two datasets at least in your canvas. Select the dataset you want to rollup the value from in the dropdown (in order to help you locate the dataset on the canvas it should be blinking when hovered on the dropdown). Then select the column that will be the output of the rollup as well as the aggregation type (the one you want the value to be displayed) and finally select the keys that will be used to identify how the lines should be merged.

In the example above we want to display the sum of`conversions`  coming from another dataset under the name of  `new_campaign` on lines that matches `campaign_id` *=* `customer_id`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.whaly.io/data-management/workbench/model-data/flow-models/flow-steps/rollup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
