Summing Categorical Questions

10-16-2020 05:09 AM
New Contributor III


In my survey I have a number of questions that are labeled with text and then categorized in the from 0 to 3 in the name column in the choices worksheet of my xls form. 

I am trying to add up these categorized values to get a total site score and have created a hidden value using a calculation for each of these questions using the "+" sign between each of the questions. When I test this out, I am getting wild answers. The total should add up to no more than 15, five categorized questions with a max value of 3, but I am getting valued in the 10,000s. 

Is it possible that it is not working because I have categorized numerically text based names that are used for the answers? If so, is there a workaround for this in the form, or is it something that I have to do outside of Survey123 post data collection?


Tags (3)
0 Kudos
2 Replies
MVP Esteemed Contributor

Yes this comes up a lot on the board.  Since it is string it is concatenating instead.  Set the bind::type field to int for all the questions.  Or you can use number() around each value in the line you are adding them up on.

Formulas—ArcGIS Survey123 | Documentation 

0 Kudos
New Contributor III


That worked for me. 

Thanks so much.

0 Kudos