Contributor
2024-04-16
12:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
649 Views
Employee
2024-04-16
07:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
Contributor
2024-04-17
10:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works! Thank you so much!!
596 Views