# 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)
```
