Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I wanted to merge content from two rows into a single row. Here is an example, if the input is the below table.
Header 1 | Header 2 | Header 3 | Header 4 |
---|---|---|---|
I2 | I1 | I3 | I4 |
I6 | I7 | I8 | I9 |
The output should be as shown below
Header 1 | Header 2 | Header 3 | Header 4 |
---|---|---|---|
I2 I6 | I1 I7 | I3 I8 | I4 I9 |
Kindly let me know how I can proceed with this.
Use Concat() function to merge the data. Like.
LOAD Concat(Distinct Header1, ' ') AS Header1,
Concat(Distinct Header2, ' ') AS Header2,
Concat(Distinct Header3, ' ') AS Header3,
Concat(Distinct Header4, ' ') AS Header4
FROM yoursourcetable;
Concat - script function ‒ QlikView
Hi,
another solution might be:
table1:
LOAD Previous(Header1)&' '&Header1 as Header1,
Previous(Header2)&' '&Header2 as Header2,
Previous(Header3)&' '&Header3 as Header3,
Previous(Header4)&' '&Header4 as Header4
INLINE [
Header1, Header2, Header3, Header4
I1, I2, I3, I4
I5, I6, I7, I8
I9, I10, I11, I12
I13, I14, I15, I16
I17, I18, I19, I20
I21, I22, I23, I24
I25, I26, I27, I28
I29, I30, I31, I32
]
Where Even(RecNo());
hope this helps
regards
Marco