# I am trying to use the calculate feature in survey123 connect to generate a score by adding up all the fields.

510
5
09-20-2023 01:45 PM
New Contributor II

I am trying to use the calculate feature in survey123 connect to generate a score by adding up all the fields. I have ran into an issue adding up more that 6 fields. I have the responses set as yes=1 and no=0, the survey will add up the first 6 fields, if add more fields to the equation, stops adding the responses and just displays the responses rather than adding them together. Any thoughts or suggestions?

Tags (2)
1 Solution

Accepted Solutions
MVP Regular Contributor

If you're doing a mathematical calculation, have all the fields been correctly set as number types?

Best,
Katie

“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
5 Replies
MVP Regular Contributor

If you're doing a mathematical calculation, have all the fields been correctly set as number types?

Best,
Katie

“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
New Contributor II

which fields do I need to make sure they are set as number types?

MVP Regular Contributor

well, if you're trying to add numbers together, they would all have to be number types.

i.e. if you want 1 + 1 = 2, those are number types. If 1 + 1 = 11, that's text.

Here's a screenshot from the Survey123 documentation showing the syntax to use in your calculation to make sure they are all number types.

If you still have questions, sharing some screenshots of your XLS form might be helpful!

Best,
Katie

“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
New Contributor II

Thank you! the cell where the calculation is, needed to be set (formatted) as a number.

MVP Esteemed Contributor

Set the bind::type column to int and that should fix it.