# Help with relevance logic please

3 years 11 months ago #109412 by mark01
mark01 created the topic: Help with relevance logic please
I struggling with some logic [shown below] seems simple but can't get it to work - any assistance would be appreciated. [Q = question]

Q28 1 - Yes ----> Go to Q29
2 - No ----> Go to Q30
Q29 Relevance Q28==1
1 - Yes ----> Go to Q30
2 - No ----> Go to Q31
Q30 Relevance Don't Know
1 - Yes
2 - No
For Q30 the logic is [everyone except Q29 No -- Q29!=2] Maybe [Q28==2 && Q29==1]
But when running the survey if you choose Q28 No[2] it doesn't go to Q30 because Q29 doesn't have an answer yet - how do I get around this logic?
Regards
Mark

Please Log in or Create an account to join the conversation.

3 years 11 months ago - 3 years 11 months ago #109417 by Ben_V
Ben_V replied the topic: Help with relevance logic please
The simplest way is to use LS built-in "condition designer"
...and start working with "SCENARIO" (if statement#1 AND OR statement#2 )...
Thee good news is that your relevance equation will be generate by the system

BTW for your Q30, it will look something like:
`((Q28.NAOK == "2")) or ((Q29.NAOK == "1"))`

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last Edit: 3 years 11 months ago by Ben_V.
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

3 years 11 months ago #109452 by mark01
mark01 replied the topic: Help with relevance logic please
Thank you for the reply.
Can you please explain whet the NAOK's do?
Regards

Please Log in or Create an account to join the conversation.

3 years 11 months ago - 3 years 11 months ago #109454 by Ben_V
Ben_V replied the topic: Help with relevance logic please
Better look at the manual and EM samples explanations...
For example here :

...Also note that is uses the .NAOK suffix for each variable. This is because of how EM supports cascading relevance. If you did not have .NAOK, then the sum would only be computed if the person said they had 4 children (e.g. if all of the variables are relevant). By using .NAOK, that means that we want to compute the sum even if all or some of the variables are irrelevant (e.g. "Not Applicable" (NA) is alright (OK)).

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last Edit: 3 years 11 months ago by Ben_V.

Please Log in or Create an account to join the conversation.

3 years 11 months ago #109457 by mark01
mark01 replied the topic: Help with relevance logic please
Thanks to both responders - with knowledge of.NAOK the problem is solved.
Cheers
Mark

Please Log in or Create an account to join the conversation.