Count number of answers

More
9 months 3 weeks ago #147798 by MarkusBuchheit
MarkusBuchheit created the topic: Count number of answers
Hello Community,

I'm using Limesurvey for the first time and I'm in the process of setting up my first survey measuring social capital. I'm examining the social capital of entrepreneurs. Now I'm asking the respondents for contacts in four different categories. Asking for the names is just a methodological tool (Name Generator), for me only the number of contacts is relevant.

After the name generator, I want to measure the number of relationships between the before listed contacts to subsequently measure the redundancy of the network. I have thought of using an array for this where the names that were listed by the respondents can be linked with each other, but setting this up has confronted me with some problems for which I kindly ask your help:

1. To make sure that only the contact names give by the respondents are shown in this array I have put all the four name generator questions in the array filter and have written the subquestions in this form: {if(!is_empty(Contacts1_CON01),Contacts1_CON01,'Contact 1')}
But this does not seem to work for the answers (the columns of the array). Any ideas? Maybe there is some mirroring option?

2. Is it possible to allow more than one answer in a row of an array?

3. Is there an option of a function that will automatically give me the number of the indicated relationships? This is also relevant for the name generator where I want to compute the number of unique answers and for another questions where I am asking to categorise the relationship with the contact in 5 subcategories that are divided into the two categories "strong ties" and "weak ties". In latter I want the number of strong ties and the number of weak ties.

Thank you very much for your time. Please remember that I am a bloody beginner and also have only very little knowledge of HTML and such. I appreciate every effort!

Please Log in to join the conversation.

More
9 months 3 weeks ago #147823 by tpartner
tpartner replied the topic: Count number of answers
It sounds to me like you want to be using an array-numbers with checkbox layout - manual.limesurvey.org/Question_type_-_Ar...flexible_checkbox.29

You can count the checked boxes with something like this in an equation type question (given an array question code "Q1"):
{count(that.Q1)}

Have a look at Expression Manager, particularly available variables and functions - manual.limesurvey.org/Expression_Manager

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: MarkusBuchheit

Please Log in to join the conversation.

More
9 months 2 weeks ago - 9 months 2 weeks ago #147932 by MarkusBuchheit
MarkusBuchheit replied the topic: Count number of answers
Hello,

thank you so much so far, using an array-numbers with checkbox layout has brought me a lot closer. Now I have a new problem: On the x-scale and the y-scale I want only the previously entered names to be shown. I used the subquestion-relevance for this. For the y-scale, this has worked fine and the the logic is shown as the following: (the questions 2, 3, 4 and 5 with their respective subquestions a-e ask for the names, the relevance sets the condition that the entry cannot be empty)

SQ-1 q10_q10aa ! is_empty(q2_q2a) q2_q2a
SQ-2 q10_q10ab ! is_empty(q2_q2b) q2_q2b
SQ-3 q10_q10ac ! is_empty(q2_q2c) q2_q2c
SQ-4 q10_q10ad ! is_empty(q2_q2d) q2_q2d
SQ-5 q10_q10ae ! is_empty(q2_q2e) q2_q2e
SQ-6 q10_q10af ! is_empty(q3_q3a) q3_q3a
SQ-7 q10_q10ag ! is_empty(q3_q3b) q3_q3b
SQ-8 q10_q10ah ! is_empty(q3_q3c) q3_q3c
SQ-9 q10_q10ai ! is_empty(q3_q3d) q3_q3d
SQ-10 q10_q10aj ! is_empty(q3_q3e) q3_q3e
SQ-11 q10_q10ak ! is_empty(q4_q4a) q4_q4a
SQ-12 q10_q10al ! is_empty(q4_q4b) q4_q4b
SQ-13 q10_q10am ! is_empty(q4_q4c) q4_q4c
SQ-14 q10_q10an ! is_empty(q4_q4d) q4_q4d
SQ-15 q10_q10ao ! is_empty(q4_q4e) q4_q4e
SQ-16 q10_q10ap ! is_empty(q5_q5a) q5_q5a
SQ-17 q10_q10aq ! is_empty(q5_q5b) q5_q5b
SQ-18 q10_q10ar ! is_empty(q5_q5c) q5_q5c
SQ-19 q10_q10as ! is_empty(q5_q5d) q5_q5d
SQ-20 q10_q10at ! is_empty(q5_q5e) q5_q5e

As I said, this works fine for the y-scale. For the x-scale of the array I have used the exact same relevance equation, but it does not work and the logic is shown as this:

A[1]-1 q10ba [VALUE: q10ba] q2_q2a
A[1]-2 q10bb [VALUE: q10bb] q2_q2b
A[1]-3 q10bc [VALUE: q10bc] q2_q2c
A[1]-4 q10bd [VALUE: q10bd] q2_q2d
A[1]-5 q10be [VALUE: q10be] q2_q2e
A[1]-6 q10bf [VALUE: q10bf] q3_q3a
A[1]-7 q10bg [VALUE: q10bg] q3_q3b
A[1]-8 q10bh [VALUE: q10bh] q3_q3c
A[1]-9 q10bi [VALUE: q10bi] q3_q3d
A[1]-10 q10bj [VALUE: q10bj] q3_q3e
A[1]-11 q10bk [VALUE: q10bk] q4_q4a
A[1]-12 q10bl [VALUE: q10bl] q4_q4b
A[1]-13 q10bm [VALUE: q10bm] q4_q4c
A[1]-14 q10bn [VALUE: q10bn] q4_q4d
A[1]-15 q10bo [VALUE: q10bo] q4_q4e
A[1]-16 q10bp [VALUE: q10bp] q5_q5a
A[1]-17 q10bq [VALUE: q10bq] q5_q5b
A[1]-18 q10br [VALUE: q10br] q5_q5c
A[1]-19 q10bs [VALUE: q10bs] q5_q5d
A[1]-20 q10bt [VALUE: q10bt] q5_q5e

Now my question: Why is this happening and how can I get the relevance equation to work for the x-scale too?

Again, thank you very much in advance!
Attachments:
Last Edit: 9 months 2 weeks ago by MarkusBuchheit.

Please Log in to join the conversation.

More
9 months 2 weeks ago #147951 by MarkusBuchheit
MarkusBuchheit replied the topic: Count number of answers
I opened a new topic for my new question under: www.limesurvey.org/de/foren/design-issue...bers-question#147950

This topic can be closed, thank you!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!