Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ecolomer
Master II
Master II

transform a string

Hi

I have a csv file with the following structure:

- First value is Id

- Second value is a string consisting of repeats separated by commas sets with the following content: "1", "3"

The first number (1) is the number of questions and the second number (3) is the value of the reply

They are 55 repetitions and one o two more items but not in all cases

I would get a table with the following structure:

Id, Question, Answer

example:

Input file:

15, "1", "3", "4", "2", "3": "1"

table result

15, 1, 3

15, 4, 2

15, 3, 1

Attached is csv file

1 Reply
anbu1984
Master III
Master III

Load id_project_participant,Replace(Purgechar(SubField(answers,','),'"'),':',',')

FROM

[answers.csv]

(txt, codepage is 1252, embedded labels, delimiter is ';', msq);