Select to view content in your preferred language

Is it possible to generate a sum in a report?

498
2
08-08-2023 12:26 PM
Robert_King
New Contributor II

I would like to add up all the numbers from each field and create a Total sum row in my report. I understand that the numbers need to be converted into integers but when I try that Im not getting the expected result.  Any help would be greatly appreciated!

0 Kudos
2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @Robert_King

Assuming overall_safetyppe and general_overall_excavation are integer field types, in your report template you can use the syntax ${overall_safetyppe + general_overall_excavation}. Please see the Numbers section of the Feature report templates documentation for more information. 

The report engine has limited formula support and the int() function is not supported. If the two fields are text fields I would suggest performing the calculation in the survey using the calculation column of the surveys XLSForm. 

 

Thank you,
Zach
0 Kudos
Robert_King
New Contributor II

Hey @ZacharySutherby 

They are not integer fields, the numbers are selected from a dropdown list.  I tried putting the syntax in the calculation field but it still returns blank in the report.  I figure I need to convert the text fields from the dropdown list to integers.

Screenshot 2023-08-09 123859.pngScreenshot 2023-08-09 124125.png

Thanks,

Robert

0 Kudos