Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Meallly
Contributor
Contributor

Duplicate rows based in ocurrences in a field

Hello

I have a table of questions and answers from an account.
Some questions are multi choice and I would like to have a line for each of them.

For example:
QUESTION ID, ANSWER
1, Yes
2, No
3, 1^5^10

For question 3, it is a multi-choice question where the user has selected 3 answers.

I would like to obtain the following final table:

QUESTION ID, ANSWER
1, Yes
2, No
3, 1
3, 5
3, 10

How could I get it?

Labels (1)
Lisa_P
Employee
Employee

You could do this in the load script:

Data:
Load *,
Subfield(ANSWER, '^') as NEWANSWER;
Load * Inline [
QUESTION ID, ANSWER
1, Yes
2, No
3, 1^5^10
];

It would result in this in the data load:

Lisa_P_0-1713308827018.png

 

View solution in original post

Meallly
Contributor
Contributor

It works! Thank you so much!!