Survey123 - Calculate sum of fields that have relevant formulas set?

132
2
Jump to solution
08-03-2022 12:02 PM
mrosekulick
New Contributor III

Hello! I am attempting to calculate a sum of fields in Survey123 Connect. I have a list of decimal fields that represent the "total of x species" seen in the field. These fields are set up with a relevant formula to only appear if the species is seen (determined from a select_multiple field). The default value for these fields is 0. I also want to also calculate a sum of all the species totals. What I'm finding is that if one of total_SPECIES fields doesn't appear in the survey, the total won't be calculated. 

I found this blog and tried the default value technique, but the relevancy seems to be making it weird: https://support.esri.com/en/technical-article/000022441

Here is a screenshot of my spreadsheet:

mrosekulick_0-1659553068101.png

And a screenshot of my form: 

mrosekulick_1-1659553119190.png

I didn't create a calculation for the whole list of species yet, just to make sure it works before I spend too much time. 

Thanks for the help!

 

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Notable Contributor

I think you are having the same issue as this post  https://community.esri.com/t5/arcgis-survey123-questions/constrain-total-value-of-repeat-entries/m-p...

Basically use coalesce or hidden.

Also I would use the selected() method for the relevant not regex.  See https://community.esri.com/t5/arcgis-survey123-questions/using-choice-filter-with-a-select-multiple/...

Hope that helps

View solution in original post

0 Kudos
2 Replies
DougBrowning
MVP Notable Contributor

I think you are having the same issue as this post  https://community.esri.com/t5/arcgis-survey123-questions/constrain-total-value-of-repeat-entries/m-p...

Basically use coalesce or hidden.

Also I would use the selected() method for the relevant not regex.  See https://community.esri.com/t5/arcgis-survey123-questions/using-choice-filter-with-a-select-multiple/...

Hope that helps

0 Kudos
mrosekulick
New Contributor III

Got delayed on this project, but coalesce worked! Thank you!