Is there a way to calculate the average of a group of fields? I am currently having a calculation add all the fields and then divide by a constant, but the number of fields used may change and so the number it divides by will need to as well.

Hello Sara,
Yes, you can do this, but it involves a bit of work. Basically, rather than using a constant in your calculation, you can create an invisible number field under each question. That number field can show up "conditionally" and have a default value of 1.
If the field is conditional and only shows up if you didn't leave the question blank, or if you said "n/a" as the choice for that question or something along those lines, then the number field only shows up if the question was going to be used in the calculation. You can do a separate calculation that adds up every single invisible number field. It will end up giving you a number for the number of those fields that actually showed up. If that field was conditional then it isn't tallied in that calculation.
Therefore, when you go to your final calculation that is using a constant, you can replace that constant for the calculation you have that counted up the sum of questions applicable.
This requires insight on using Calculations, as well as making fields Conditional.
Please sign in to leave a comment.
Comments
1 comment