Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table that looks like this.
ColumnA | ColumnB | ColumnC | ColumnD |
A | D | C | F |
B | E | - | G |
C | A | - | H |
- | B | - | - |
I want to append ColumnA followed by ColumnB followed by ColumnC followed by ColumnD, and the final "ResultColumn" must look like:
I understand in QlikView it is not possible to display same values twice under one column. In that case the final "ResultColumn" may look like this
ResultColumn |
A |
B |
C |
D |
E |
F |
G |
H |
I tried concatenate, but it puts all values in once cell, which is wrong. Concatenate looks like this: ABCDEFGH
I appreciate your response.
Thanks,
R
Take a look at the attached code and application:
Temp:
LOAD ColumnA,
ColumnB,
ColumnC,
ColumnD
FROM
[https://community.qlik.com/thread/159869]
(html, codepage is 1252, embedded labels, table is @1);
Table:
LOAD ColumnA as ResultColumn
Resident Temp
Where ColumnA <> '-';
Concatenate (Table)
LOAD ColumnB as ResultColumn
Resident Temp
Where ColumnB <> '-';
Concatenate (Table)
LOAD ColumnC as ResultColumn
Resident Temp
Where ColumnC <> '-';
Concatenate (Table)
LOAD ColumnD as ResultColumn
Resident Temp
Where ColumnD <> '-';
TableFinal:
LOAD RowNo() as Key,
ResultColumn
Resident Table;
DROP Tables Temp, Table;
Try it like this:
Table:
LOAD ColumnA as ResultColumn
Resident XYZ;
Concatenate (Table)
LOAD ColumnB as ResultColumn
Resident XYZ;
Concatenate (Table)
LOAD ColumnC as ResultColumn
Resident XYZ;
Concatenate (Table)
LOAD ColumnD as ResultColumn
Resident XYZ;
HTH
Best,
Sunny
Take a look at the attached code and application:
Temp:
LOAD ColumnA,
ColumnB,
ColumnC,
ColumnD
FROM
[https://community.qlik.com/thread/159869]
(html, codepage is 1252, embedded labels, table is @1);
Table:
LOAD ColumnA as ResultColumn
Resident Temp
Where ColumnA <> '-';
Concatenate (Table)
LOAD ColumnB as ResultColumn
Resident Temp
Where ColumnB <> '-';
Concatenate (Table)
LOAD ColumnC as ResultColumn
Resident Temp
Where ColumnC <> '-';
Concatenate (Table)
LOAD ColumnD as ResultColumn
Resident Temp
Where ColumnD <> '-';
TableFinal:
LOAD RowNo() as Key,
ResultColumn
Resident Table;
DROP Tables Temp, Table;
Hi SunIndia,
I applied to your script to my original code and it works. Thanks for your promt response.
Thanks,
Raghu
Hey Raghu, I am glad I was able to help.
Have a good one.
Best,
Sunny