SumValues() is a formula query function you can use to calculate the sum of values in a field for records that match the query.
SumValues() examples
To query the same table  To query a different table  Result  

Function layout 


Numeric value 
Example using hardcoded value 
Calculates the sum of the values in field id 4 where field ID 6 is equal to “In Progress” 
Calculates the sum of the values in field ID 4 where field ID 6 is equal to “In Progress” In this case, field 4, field 6 and the records are all from the table with table alias 
Sum value: 5 
Example using field reference 
Calculates the sum of the values in field ID 4 where field id 6 is equal to the value that populates the 
Calculates the sum of the values in field ID 4 where field id 6 is equal to the value that populates the In this case, field 4, field 6 and the records are all from the table with alias 
Sum value: 7 