Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

[Export function] Ommit certain fields based on their input

More
6 years 1 month ago #165098 by dosch
Is it possible to make the export of a survey dependent on the actual answers.
Especially in a multiple choice question with many possible answers, all answers are exported, also the ones with no 'mark'.

I hope to be able to export only the questions that had an actual answer.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #165099 by Joffm
Hi, dosch,
IMO this is not possibly and not advisable.

LS exports multi punch questions binary, each answer option is exported with values "Y/ ", "1/2" or so.
Now imagine:
Respondent 1 selects answer options 1,2,3
Respondent 2 selects answer options 4,5,6
Respondent 3 selects answer options 7,8,9
How should the export look like in your opinion? Each respondent only three columns? How do you know which three? How do you want to analyze that?

And even if LS had the option to export categorically, the codes are exported, LS would have to provide all possible columns in case one respondent selects all.

On the other side analysing tools like SPSS use this.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
6 years 1 month ago #165102 by dosch
true good point, but could it then be exported in such a way that the general question shows on top and and the answer(s) the person gave are listen in the row under it?

So following your example:
RespondentWhat is your favourite nr.?
Bob1, 2, 3
Alice4, 5, 6
Eve7, 8, 9
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #165103 by Joffm
That's, what I said:
LS does not export categorically.

But anyway:
If you do it like this, the program had to check for each question the maximum number of given responses. Otherwise there have to be columns for all possible answer options in case somebody selects all.

So you'd get something like this:
Bob1,2,3,"","","","","","","","",""
Alice4,5,6,"","","","","","","","",""
Eve7,8,9,"","","","","","","","",""
John1,2,3,4,5,6,7,9,10,11,12

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: dosch
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #165104 by Joffm
Well, there is something else.

You could join the selected options by an expression.
This way you export only one column.

Create an expression with the following statement

{join(if(Q1_SQ001 == "Y", "1,", ""), if(Q1_SQ002 == "Y", "2,", ""), if(Q01_SQ003 == "Y", "3,", ""), if(Q1_SQ004 == "Y", "4,", ""))...}

You get a string like "2,5,12,16,"

Now you have only the selected options in one column.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #165105 by holch
I always wonder why people would want this weird format because I think it makes analysis so much more complicated. But from what I can see, there seem to be tools that store responses to multiple answer questions in this format and there seem to be also some analysis tools that read them like this.

But a good solution, Joffm.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose