Select to view content in your preferred language

Count formula to add results from a number of single choice fields

389
1
01-23-2023 11:04 PM
TobyChapman
Emerging Contributor

Hi there,

I have created a survey in survey123 connect for auditing which has a number of single choice fields.

Each of the choice fields have an option for pass, fail, N/A

At the top of the form I would like to have a note that counts the number of fails but I can't seem to find a calculation that will allow me to count based on a selection.

I tried changing the choice results to 1 for fail and 0 for pass and N/A and then simply adding each question but it lists the zero's in the results.

Is there a way to count the number of fails?

One other thing I would like to add is a note that lists the audits that failed.

Is this possible?

 

Any help would be very much appreciated.

 

 

Tags (2)
0 Kudos
1 Reply
JenniferAcunto
Esri Regular Contributor

If it is listing the zeros in your response, I'm guessing it is treating your values as a string and concatenating them. You will need something like 

number(${question_one}) + number(${question_two})

- Jen