Calculation logic

(Azad Likhon) #1

if(selected(${HH_Q13}, 6), 0, "")
what does this equation mean?

(Lloyd Owen Banwart) #2

This field will take the value of "0" if question "HH_Q13" is equal to 6.

(Azad Likhon) #3

thank you for your support. It will help me in my next project

(Azad Likhon) #4

Lloyd_Banwart! Hello bro, I need another help. I can't understand what is the usage of this syntax. I can find the data with value 1 by using if(selected(${variable}, 6), 1, ""). I think there is another reason to use this syntax and the value of that calculate variable, which is 0, must mean something big. Is it related to data analysis?

Sorry. I'm just a beginner. Maybe it's simple, but I can't understand. If you or anyone can help me, It will be good for me.

Thanks in advance


"IF" function basically return the desired result based on the entered data in the survey. It saves enumerator time asking the duplicate question.One can explain usages of IF function in various ways.

See the attached XLS to get insights of using of the IF function.
if_function.xlsx (8.0 KB)


(Yaw Anokwa) #6

A post was split to a new topic: A number of questions about ODK Collect