I have a select_multiple question in my Survey123 where a field worker can select multiple defects on a tree. Then, a later question asks if there are multiple defects on the tree. If yes, then that gets a score of 1. If it's just one defect, that gets a score of 0.
I want this question to automatically calculate based on the select_multiple for tree defects. How would I calculate this?
Solved! Go to Solution.
Oh look at me go! I answered my own question. I had a field called "Hazard Rating" that I was trying to automatically calculate based on a multiple_select question called "Fail_Potential". In the calculation for Hazard Rating I put this:
if(count-selected(${Fail_Potential}) = 1, ‘0’, if(count-selected(${Fail_Potential})>1, ‘1’, ${Fail_Potential}))
AND IT WORKS!
Oh look at me go! I answered my own question. I had a field called "Hazard Rating" that I was trying to automatically calculate based on a multiple_select question called "Fail_Potential". In the calculation for Hazard Rating I put this:
if(count-selected(${Fail_Potential}) = 1, ‘0’, if(count-selected(${Fail_Potential})>1, ‘1’, ${Fail_Potential}))
AND IT WORKS!