Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
Is it possible to split a cell value into rows like shown in below tables in qlikview?
AVAILABLE TABLE | |
Airline-DM | Class-DM |
ABC AIRLINE | All |
ABC AIRLINE | H |
ABC AIRLINE | J,C,I,U,B,M,W,R,E,Y |
ABC AIRLINE | T,Z |
TABLE REQUIRED | |
Airline-DM | Class-DM |
ABC AIRLINE | All |
ABC AIRLINE | H |
ABC AIRLINE | J |
ABC AIRLINE | C |
ABC AIRLINE | I |
ABC AIRLINE | U |
ABC AIRLINE | B |
ABC AIRLINE | M |
ABC AIRLINE | W |
ABC AIRLINE | R |
ABC AIRLINE | E |
ABC AIRLINE | Y |
ABC AIRLINE | T |
ABC AIRLINE | Z |
Please help.
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
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
Dear Maria,
Great! Thanks a lot.
You are welcome . Please mark it as correct answer so your question will be flagged as "answered".