Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Not applicable

Splitting rows in Script

Hi,

I have an excel file which contains ID and other fields. ID contains multiple values in it. I need to separate each row based on ID.

Example:

ID         Value

1,2,3        100

4,5,6         200

7,8,9          300

Output:

ID           Value

1              100

2              100

3              100

4               200

5               200

6               200

7               300

8               300

9               300

Can any one tell me a way to achieve this.

Thanks

Tags (3)
1 Solution

Accepted Solutions
Highlighted

Re: Splitting rows in Script

Try using the Subfield() function:

Table:

LOAD * Inline [

ID |        Value

1,2,3 |        100

4,5,6 |        200

7,8,9 |        300

] (delimiter is |);

NewTable:

NoConcatenate

LOAD SubField(ID, ',') as ID,

          Value

Resident Table;

DROP Table Table;


Update1: Forgot to add NoConcatenate

Update2: Sample Attached

View solution in original post

3 Replies
Highlighted

Re: Splitting rows in Script

Try using the Subfield() function:

Table:

LOAD * Inline [

ID |        Value

1,2,3 |        100

4,5,6 |        200

7,8,9 |        300

] (delimiter is |);

NewTable:

NoConcatenate

LOAD SubField(ID, ',') as ID,

          Value

Resident Table;

DROP Table Table;


Update1: Forgot to add NoConcatenate

Update2: Sample Attached

View solution in original post

Highlighted
Not applicable

Re: Splitting rows in Script

Thank you. It's working the way I need.

Highlighted

Re: Splitting rows in Script

Awesome

I am glad I was able to help.

Best,

Sunny