> For the complete documentation index, see [llms.txt](https://docs.aqua-cloud.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aqua-cloud.io/documentation/reporting/sum-function.md).

# 'Sum' function

Easily sum or count data in report labels and tables - no scripting needed. Configure summary settings for group, report, or page totals directly in the properties panel.

The Sum function for a label or table cell allows you to collect data from different elements. This function allows you to perform a simple count of the number of items without having to use scripts.

To do this, go to the properties of a field in the Data section and select Summary. In the running field, you can choose to total only the group, the whole report or each page.

<figure><img src="http://aquawiki.andagon.com/pictures/drex_sum_function_1_custom.png" alt="" width="375"><figcaption></figcaption></figure>

&#x20;In the Run Editor (white box next to the summary) you can then select the function, i.e. whether you want the summary to be summed, counted (number) or other groupings.

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2F2tXmYxP6KcrA3ATLAt4L%2FReporting_sum_function.png?alt=media&amp;token=32b7a952-70d4-468f-ba14-07a1b091d4e9" alt=""><figcaption><p>Navigating to the Run Editor</p></figcaption></figure>

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2FyYTHBQpGMFabVdMpy7sB%2FReporting_sum_function_accesing_run_editor.png?alt=media&amp;token=3719a3b3-d6c8-48aa-b382-57fb0c9c103a" alt="" width="514"><figcaption><p>Accessing the Expression Editor</p></figcaption></figure>

Using respective formula fields (for example, “If output 0/1” (see formula below)), you can calculate characteristic values for elements.&#x20;

{% code overflow="wrap" %}

```
Iif([LastExecutionStatusInvariant]=='Passed', 1, 0) 
// all test cases with the status “Passed”
```

{% endcode %}

<figure><img src="https://3920520305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyZbW8vbNs5hz8x57emJJ%2Fuploads%2FAm8B5SE1zPRJogqAG8cY%2Fimage.png?alt=media&amp;token=9b1956bd-d673-41e9-872c-0005e9b62748" alt="" width="563"><figcaption><p>Utilizing Expression Editor</p></figcaption></figure>


---

# 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.aqua-cloud.io/documentation/reporting/sum-function.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.
