Conditional Binding, "if statement" to sum a list

Dear community

For a questionnaire on healthcare costs I would like to compare the sum of
the costs with the cost breakdown to check the given response.

I could easily sum to total costs with calculate, however, we allow the
respondent to fill in "-98" or "-99" in case he/she does not know the costs
or do not want to share what they have paid.

To calculate to costs taking this into account I have to use an
"if-statement" or so called conditional operator in ODK. I'm really
struggeling with creating this calculation in xls forms. Please find my
example attached.

Does anyone have a solution to my problem? Any help is much appreciated!!

Regards,
Heleen

TEST_COSTS.xlsx (17.2 KB)

Hi,

I've attached a version that adds up the costs, ignoring -99 (well,
ignoring any negative number).

Hope that helps.

test_total.xls (27 KB)

ยทยทยท On Friday, 5 February 2016 13:51:11 UTC+13, Heleen wrote: > > Dear community > > For a questionnaire on healthcare costs I would like to compare the sum of > the costs with the cost breakdown to check the given response. > > I could easily sum to total costs with calculate, however, we allow the > respondent to fill in "-98" or "-99" in case he/she does not know the costs > or do not want to share what they have paid. > > To calculate to costs taking this into account I have to use an > "if-statement" or so called conditional operator in ODK. I'm really > struggeling with creating this calculation in xls forms. Please find my > example attached. > > Does anyone have a solution to my problem? Any help is much appreciated!! > > Regards, > Heleen >