I want to calculate the sum of all the numeric fields in my form and its average. How can I do this?

I want to calculate the sum of all the numeric fields in my form and its average. How can I do this?

To find the sum of numeric field values in a form, add a formula field with the expression (field1 + field2 + field3), where field1, field2 and field3 are deluge names of the respective numerical fields in the form. Let's consider a form containing number fields to store the marks obtained in subjects: English, Maths and Science. The field "Total Marks" and "Average" are formula fields to calculate the total and average marks obtained and its expressions are as suggested below.

Total Marks Field:

  1. (Maths + English + Science)

Average Field:
  1. ((English + Maths + Science) / 3)
Note: The above solution would work only while the concerned fields are of numerical type and would not work for single line fields collecting numerical information.