This article goes over the sum
function. The sum
function allows us to sum up one or more numerical variables within a collection.
Syntax
{collection | sum:'variableOne'}
You can also include math within the sum
function.
{collection | sum:'variableOne*variableTwo'}
Example
Transactions:
|
||
Code |
Meaning |
Result |
{transactions | sum:'numShares'} |
All shares issued |
7 |
{transactions | sum:'numShares*pricePerShare'} |
Aggregate consideration received |
120 |