Select to view content in your preferred language

Calculation not working

02-29-2024 10:40 AM
New Contributor III

Still looking for the assistance of people smarter than I with this survey. 🙂

I got most of the calculations working, but there's one that just won't work. (I'm sure it's for a dumb reason). When selected, it does not calculate a value like it's supposed to. The bind is set to integer.



In Survey123, the value shows as 0 when the option for crimeobserved is selected.


The XLSForm is attached.



0 Kudos
2 Replies
New Contributor III

I think it is because you have CrimeObserved named differently in your "choices" sheet. There, it is just listed as "crime", so in your calculation, you'd have to write: if(selected(${crime},'crime'),1, 0)


OR change the name in the choices sheet to 'crime observed'

Occasional Contributor

Definitely this. 'crimeobserved' isn't a choice in the list, so it will always return 0.  

0 Kudos