logo SmartSurvey / Scripting Docs
Back to Docs
Built-in Function
sumof[Qx] Arithmetic

Returns the arithmetic sum of all numeric entries in a list-numeric or total question. Use to check whether total spend, scores, or allocations meet a threshold.

Parameters
Parameter Type Description
Qx Question ref A *NUMBER list or *NUMLISTTOTAL question
Returns: Number — arithmetic sum of all entries in Qx
Examples
expressions
sumof[Q13]>=5000    -- total monthly spend is 5000 or above
sumof[Q17]=100      -- allocation sums to exactly 100
sumof[Q13]>sumof[Q14]   -- Q13 total greater than Q14 total
sumof[] adds the values. totalof[] counts the entries. Do not confuse the two.
Related