Aggregate functions with a default value

71
1
11-28-2018 06:19 PM
Highlighted
Occasional Contributor III

I was wondering if someone could point me in the right direction. I have a repeat that calculates certain fields and based on that field I want to aggregate and sum up all of the users input. I can successfully do this with the aggregate sum function; However, if the user does not provide an input for that integers field, this aggregate sum function does not populate. Is there a way to assign a default value to the aggregate field of zero so at least the calculation can proceed?

Tags (1)
Reply
0 Kudos
1 Reply
Highlighted
Esri Frequent Contributor

Hi Jarom,

Yes this is possible, you can use if() statement, and if the value is null set the default as 0, otherwise use the calculated valued. Do this in the fields with calculations inside the repeats, and then the sum() function will work as expected outside the repeat to sum all the values.

Phil.

Reply
0 Kudos