Calculate - simple add function not working

329
1
11-22-2020 05:54 PM
PrachiPatel
New Contributor III

A simple add function in survey 123 is not working right. 

I have a select multiple for types of commercial use, eg: hospital, retail, education facility etc.

Using relevance, I have calculated no. of employees in each commercial use. So if hospital is selected, then hospital employees will get calculated and so on

Now I want to sum up the total employees. However, lets assume hospital and retail is selected - then hospital and retail employees get calculated but education facility does not get calculated (because education facility was not selected). Therefore survey 123 connect returns no value when I try to calculate hospital emp + retail emp + education facility emp

what can be the work around for this?

0 Kudos
1 Reply
PrachiPatel
New Contributor III

James Tedrick's response on this other post was helpful

https://community.esri.com/t5/arcgis-survey123-questions/addition-calculations-not-working/m-p/85473...

Solution to use coalesce (${q},0) - so if the commercial use is not selected and therefor has a NaN value in employees calculated - survey 123 will use 0 instead 

0 Kudos