> 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

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="/files/ceqIQmeewnjV8YS1GLwA" alt=""><figcaption><p>Navigating to the Run Editor</p></figcaption></figure>

<figure><img src="/files/j2anSviUxT8Gulwl2VOe" 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="/files/9M1MSnF94MS6UCa587m5" 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 dynamically by asking a question.

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

```
GET https://docs.aqua-cloud.io/documentation/reporting/sum-function.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
