# Sum Function

The sum function for a label or a table cell allows you to collect data from different elements. With the sum function, you have the option to do a simple count of the number of elements without having to use scripts. &#x20;

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

Using respective formula fields (for example, “If output 0/1” (see formula below)), you can calculate characteristic values for elements. For example, all test cases with the status “Passed”.

```csharp
Iif ([LastExecutionStatusInvariant] == 'Passed', 1, 0)
```


---

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