Select to view content in your preferred language

Survey Adding Decimals to a Calculated Field in Data Section

170
2
Jump to solution
4 weeks ago
AbigailEbelherr
Occasional Contributor

I have created my survey in Connect and uploaded it to the online portal. The survey allows users to score competition submissions based on our criteria. These criteria need to be weighted, so I created a hidden question that is used to calculate the weighted score at the end. The calculation is as follows:

(${multigenerational_living}*.25)+(${universal_design}*.25)+(${housing_affordability}*.2)+(${environmental_sustainability}*.1)+(${infill_development}*.1)+(${modularity}*.05)+(${cultural_character}*.05)

Criteria can be scored 0-5.

The issue is that for some combinations of scores, the Weighted Score Total shows multiple extra decimal places that shouldn't be there:

Screenshot 2025-07-26 210023.png

Strangely, if I download the file as a CSV or Excel document, those decimals are gone, and the correct score shows (see attachment). I've also tried taking off different weights and adding them back into the calculation - it seems like it works fine if there are 5-6 weights added but then messes up again when the sixth or seventh is added.

I've attached my xlsx document for the survey, as well. If anyone has any answers, I'd like to know what the issue is.

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

This is a known issue due to how floating point math is handled.

https://support.esri.com/en-us/bug/the-subtraction-operation-in-arcgis-survey123-connect-r-bug-00010...

You can resolve the issue using round(value, places) on the inputs or end results.

View solution in original post

2 Replies
ChristopherCounsell
MVP Regular Contributor

This is a known issue due to how floating point math is handled.

https://support.esri.com/en-us/bug/the-subtraction-operation-in-arcgis-survey123-connect-r-bug-00010...

You can resolve the issue using round(value, places) on the inputs or end results.

AbigailEbelherr
Occasional Contributor

Thank you!