Show question if answer from previous multichoice ques is gt 1 multichoice

More
1 month 2 days ago #188930 by Carolyn2017
I have a multichoice question Q24, it has 10 options, Q24_10 is none of the above, and used to filter some following questions (Q26 etc).

But in Q25 (radio) I only want this to show if more than 1 option from Q24, but not Q24_10.


((Q24_10.NAOK !="Y")) AND !sum (Q24_1, Q24_2, Q24_3, Q24_4, Q24_5, Q24_6, Q24_7, Q24_8, Q24_9 <=1).
It is hidden if Q24_10 is ticked or if any one item from Q24 is ticked,

but I can not now get it to show if more than 1 item from q 24 is ticked.
Has anyone got some advice

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

LimeSurvey Partners
More
1 month 1 day ago #188933 by DenisChenu
Think you need to add the NAOK inside the sum too.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

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

More
1 month 1 day ago - 1 month 1 day ago #188934 by tpartner
Try this:

Q24_10.NAOK !="Y" AND count(that.Q24.NOAK) > 0

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 1 month 1 day ago by tpartner.

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

More
1 month 1 day ago #188935 by DenisChenu
@tpartner : need count except Q24_10 ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

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

More
1 month 1 day ago #188937 by tpartner
I think the first condition excludes Q24_10.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

More
1 month 1 day ago #188938 by Joffm
Hi, Carolyn2017,
for your better understanding.
Why doesn't your "sum(Q24_1,Q24_2,...)" work?

The results of the subquestions in a multiple question are stored as "Y" (=selected) or "" (=not selected).
So you try to sum something like "Y"+"Y"+""+"Y"+""+"". Because this is not possible the result of the sum always is "0".

Therefore you have to use the function "count".

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: Carolyn2017

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

More
1 month 1 day ago - 1 month 1 day ago #188939 by DenisChenu

Joffm wrote: Hi, Carolyn2017,
for your better understanding.
Why doesn't your "sum(Q24_1,Q24_2,...)" work?

The results of the subquestions in a multiple question are stored as "Y" (=selected) or "" (=not selected).
So you try to sum something like "Y"+"Y"+""+"Y"+""+"". Because this is not possible the result of the sum always is "0".

Yes, totally right … sorry … must use count

And … i really think there are a potential NAOK issue …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 1 month 1 day ago by DenisChenu. Reason: Sorry : Joffm have right (like always)

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

More
1 month 1 day ago #188990 by Carolyn2017
Thank you, but maybe I was not clear.

I want my following question (Q25) to only show if there are 2 options from the multichoice Q24, but not to include Q24_10 (none of the above).
that is I want it to show 2 items, but not including Q24_10.
So I tried

((Q24_10.NAOK!="Y")) AND count(Q24_1”Y"+Q24_2"Y"+Q24_3"Y"+Q24_4"Y"+Q24_5"Y"+Q24_6"Y"+Q24_7"Y"+Q24_8"Y"+Q24_9"Y") !=1
and
!count(Q24_1”Y"+Q24_2"Y"+Q24_3"Y"+Q24_4"Y"+Q24_5"Y"+Q24_6"Y"+Q24_7"Y"+Q24_8"Y"+Q24_9"Y") ==1
when I tried it with NOAK the relevance came up red.

count(Q24_1”Y"+Q24_2"Y"+Q24_3"Y"+Q24_4"Y"+Q24_5"Y"+Q24_6"Y"+Q24_7"Y"+Q24_8"Y"+Q24_9"Y".NAOK<=2.
any other suggestions. I am getting abit sad, the unit who support this just keep sending me the manual, so I am at abit of a loss.
Carolyn

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

More
1 month 23 hours ago #188995 by Joffm
tpartner showed already:

Q24_10.NAOK !="Y" AND count(that.Q24.NAOK) > 1


Obviously this equation says:
Only to display if: Q24_10 is not selected AND the count of the selected items of Q24 is gt 1.

Regarding your tries like

!count(Q24_1”Y"+Q24_2"Y"+Q24_3"Y"+Q24_4"Y"+Q24_5"Y"+Q24_6"Y"+Q24_7"Y"+Q24_8"Y"+Q24_9"Y") ==1

What made you get this idea?
PLEASE, read the parts in the manual (all in section "Expression Manager")
  • about implemented functions
  • about "this", that" and "self"
  • access to variables
  • study the Demo surveys.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

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

More
1 month 22 hours ago #188997 by DenisChenu
We give a lot information, how, we this information you can write such equation:ohmy: :huh:

If you want to use your logic :
Q24_10.NAOK !="Y" AND count (Q24_1.NAOK, Q24_2.NAOK, Q24_3.NAOK, Q24_4.NAOK, Q24_5.NAOK, Q24_6.NAOK, Q24_7.NAOK, Q24_8.NAOK, Q24_9.NAOK) > 1

But @tpartner solution logic is OK too …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

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

More
1 month 22 hours ago #188998 by Carolyn2017
Thanks Joffm, I really appreciate your help. I found that example somewhere and thought it made sense, but obviously not.

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

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!