Using Calculate field to add multiple fields but it wont return value unless all fields have value

296
1
Jump to solution
06-27-2023 06:52 AM
SeanNagy1
New Contributor III

I am trying to add 6 fields together but for some reason the formula doesnt display a result unless all of the fields have a value. Is there a way to make it return a value even if some of the fields are currently empty since they may not always be used?

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

Yes you can use coalesce.  Example  coalesce($field}, 0)  This happens because a empty field gets '' empty string then the math fails.

coalesce(value1, value2)

Returns the first nonempty value. This function supports only two values.

coalesce(${question_one}, ${question_two})

Bookmark this page its super handy   https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm 

View solution in original post

0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

Yes you can use coalesce.  Example  coalesce($field}, 0)  This happens because a empty field gets '' empty string then the math fails.

coalesce(value1, value2)

Returns the first nonempty value. This function supports only two values.

coalesce(${question_one}, ${question_two})

Bookmark this page its super handy   https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm 

0 Kudos