Raj_Na
1
I want to calculate a question/variable, based on two other questions.
My questions are: Education, Occupation and SEC. Here is
what I wish to achieve:
IF(Education=1) AND
(Occupation=8) SEC=1
IF(Education=2) AND (Occupation=7) SEC=2
Appreciate if someone can assist.
Hi,
This is perfectly possible using calculate questions (see http://support.kobotoolbox.org/customer/en/portal/articles/1656563-how-to-use-calculate-questions).
The format is very similar to Excel, using the if( condition, if-true, if-false) style. So you would want:
- if( (${Education} = 1 and ${Occupation} = 1), 1, 0)
You can then replace the 0 with an additional if statement to cover your second case.
Someone else may know a more elegant way to do this, rather than just nesting if statements?
Hugh
ยทยทยท
On Thursday, 20 October 2016 11:49:55 UTC+1, raj....@gmail.com wrote:
I want to calculate a question/variable, based on two other questions.
My questions are: Education, Occupation and SEC. Here is what I wish to achieve:
IF(Education=1) AND (Occupation=8) SEC=1
IF(Education=2) AND (Occupation=7) SEC=2
Appreciate if someone can assist.