You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

SUM


This function adds the values of a collection of numbers.


Syntax

 SUM ( collection )


Inputs

  • collection - A collection of number values.


Return types

  • number

  • integer

  • currency

  • percentage


Examples

Suppose the following data model.


Person.namePerson.genderPerson.age
“Kim”“f”23
“Rick”“m”35
“Bob”“m”42
“John”“m”19
“Mary”“f”33
ExpressionResultType
SUM ( COLLECT Person.age FROM ALL Person )152Integer
SUM ( COLLECT Person.age FROM ALL Person WHERE ( Person.gender = "m" ) )96Integer
SUM ( [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] )55Integer


  • No labels