Description
The sumFolder function enables the calculation of sums for a specified expression list within a specific folder. Optionally, subtasks can also be included in the calculation. This function is particularly suitable for analyzing project data at the folder level.
Syntax
sumFolder('expression', includeSubtasks)
Arguments
| Argument | Description |
|---|---|
expression |
The expression for which the sum is calculated. The expression can include various values or fields that should be summed. |
includeSubtasks (optional) |
An optional parameter that determines whether subtasks are included in the calculation. true means subtasks are taken into account, false means only the main task is included. |
Return Types
The function returns the sum of the specified expression. If includeSubtasks is set to true, the sum is calculated including all associated subtasks within the folder.
Example
Suppose you have a folder Q1 Budget with the following tasks:
| Task | Costs | Subtasks |
|---|---|---|
| Marketing | 500 |
|
| Development | 1000 |
|
| Sales | 700 |
|
To calculate the total costs for the Q1 Budget folder, including subtasks, use:
sumFolder('Kosten', true)
Result: 3750
If you only want to consider the costs of the main tasks without subtasks, use:
sumFolder('Kosten', false)
Result: 2200
Comments
0 comments
Please sign in to leave a comment.