Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
farru_scorpio
Contributor III
Contributor III

Splitting into rows

Dear Experts,

     Is it possible to split a cell value into rows like shown in below tables in qlikview?

  

AVAILABLE TABLE
Airline-DMClass-DM
ABC AIRLINEAll
ABC AIRLINEH
ABC AIRLINEJ,C,I,U,B,M,W,R,E,Y
ABC AIRLINET,Z

  

TABLE REQUIRED
Airline-DMClass-DM
ABC AIRLINEAll
ABC AIRLINEH
ABC AIRLINEJ
ABC AIRLINEC
ABC AIRLINEI
ABC AIRLINEU
ABC AIRLINEB
ABC AIRLINEM
ABC AIRLINEW
ABC AIRLINER
ABC AIRLINEE
ABC AIRLINEY
ABC AIRLINET
ABC AIRLINEZ

Please help.

1 Solution

Accepted Solutions
JaMajka1
Partner Ambassador
Partner Ambassador

Hello Farrukh,

you have to use subfield() function without third paramter. This leads to creation new rows. Your load scipt then will be like this:

[table]:

noconcatenate

load * inline

["Airline-DM","Class-DM"

A,"1,2,3"

B,4

];


[new_table]:

noconcatenate

load

      "Airline-DM",

     subfield("Class-DM",',') as new_column

resident table;


drop table table;


Hope it helps,


Maria

View solution in original post

3 Replies
JaMajka1
Partner Ambassador
Partner Ambassador

Hello Farrukh,

you have to use subfield() function without third paramter. This leads to creation new rows. Your load scipt then will be like this:

[table]:

noconcatenate

load * inline

["Airline-DM","Class-DM"

A,"1,2,3"

B,4

];


[new_table]:

noconcatenate

load

      "Airline-DM",

     subfield("Class-DM",',') as new_column

resident table;


drop table table;


Hope it helps,


Maria

farru_scorpio
Contributor III
Contributor III
Author

Dear Maria,

Great! Thanks a lot.

JaMajka1
Partner Ambassador
Partner Ambassador

You are welcome . Please mark it as correct answer so your question will be flagged as "answered".