Conditional calculations

may you guide on this?
am getting this error, anyone to help me:
Error: Error: Unexpected token ‘if’ interpretting formula: if(selected(data(‘correctInterviewee’),‘1’),0,if(selected(data(‘reason’),‘88’),1,0)) on sheet: survey row: 30 column: calculation

am trying to change this calculation to fit odk-x: if(…/correctInterviewee=‘1’,0,if(…/reason=‘88’,1,0))

Hi @Godfrey_John! I would separate the if out into a clause and condition and then do the calculation between the if and end if for each case. You’ll also need to make sure the new variable you are calculating is added to the model statement. The ODK-X XLSX converter reference documentation is likely to be helpful: ODK-X XLSX Converter Reference — ODK-X Docs

Also @Godfrey_John note that I am splitting this item into a new support topic and deleted the duplicate post. Please make only one post with the same question and if you have a new question make a new post.