Create calculation function error

“Hi, I need to calculate the total amount of food crops. If I select all four options in my demo, it will work, but if I choose fewer than the maximum (1, 2, or 3), it won’t give a result. Please see my demo and help me fix it. Thank you all.”

I assume its not calculating the null value and not showing total when fewer options are chosen.

For non selected option we can use coalesce, which reads as if the option is not selected, it will be “0”.

Please go through the Form Logic - ODK Docs

1 Like

@donan28, try checking out the coalesce in your calculation column that should help you solve your issue as outlined in the post discussed previously:

Thank you so much, it is done.

1 Like

Thank so much, Man

1 Like