# SUM\_OF\_ANY

### Description

`SUM_OF_ANY` is the flexible counterpart of [`SUM`](/rule-language/operators/mathematical-operators/sum.md).\
It gives you the added total of the values you provide in between a set of brackets, each separated by a comma.

If a value is not available:

* `SUM_OF_ANY` simply ignores it and gives you the total of values that are available
* `SUM`, before returning a result, will alert you to go back and provide the missing value.

### Example

```
p is Person
SUM_OF_ANY(
    p.income_from_employment, 
    p.income_from_wealth_gain, 
    p.other_income
)
```

This [expression](/rule-language/expressions.md) will add up the three types of personal income mentioned.

If the person in this case does not have any income from wealth gain, the outcome will be the total of the other two sources of income.


---

# 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.atfinity.io/rule-language/operators/unknown-operators/sum_of_any.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.
