Select to view content in your preferred language

Creating a section to summarize total choices

576
2
03-30-2019 08:44 PM
by Anonymous User
Not applicable

Hello everyone!

I have a predicament with a survey form I am developing.

We're doing very detailed reef substrate checking.  We have 4 segments (which I conveniently separated into groups in this survey). Each groups have 20 intervals, thus containing 20 select_one questions. And each question ('select_one' question) has 10 choices of answers! Just explaining this is already scaring me a little. 

I am wondering if there is a possible way to calculate and sum the different choices accordingly at the end of the survey in a 'note' question type?

I've gone through some of the answers here, and I found something like the formula below:

 

if(selected(${question1}, 'yes'), 1, 0) + if(selected(${question2}, 'yes'), 1, 0) + if(selected(${question3}, 'yes'), 1, 0)

I am not sure which 'column' I'm supposed to type this into and typing out 20 questions times 4 isn't too practical! How do we go about this?

Any sort of input/hints would be super awesome and will really help us out. 

 

 

Azalea

#xlsform#survey123forarcgisconnect#geonet survey123

0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

If you do not need Yes on the backend you could do a label of yes but a value of 1.

What I did is have a second field right below the choice the does your if statement If(field1=yes,1,0).   Make sure to bind it to type int.  Then at the end of the form I can just do a sum(field1).  Can also then avg by doing sum(field1)/count(field1).

I did all of this across repeats though.  Maybe you want a repeat?  Then it is just one question with a repeat limit of 20.

by Anonymous User
Not applicable

Thanks for the idea Doug! I only thought of using repeats but didn't think too far off to obtain the integers and all! 

I'm gonna try this out immediately and confirm the reproducible steps.