Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

transform columns in header

Hi,

I would transform a columns to header in a script, but I don't found any solution.

For example,I have this data :

IdKeyValue
1AZE10
1QSD30
2AZE25
3WXC60
4AZE20
4QSD60
4WXC90

And I would obtain this :

IdAZEQSDWXC
11030
225

3

60
4206090

Have you an idea, how to do this ?

Thank you in advance

Cédric

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Re: transform columns in header

Hi,

use

generic LOAD Id,

     Key,

     Value

FROM Excel;

Mark answered if it helps

2 Replies
Not applicable

Re: transform columns in header

Hi,

use

generic LOAD Id,

     Key,

     Value

FROM Excel;

Mark answered if it helps

Not applicable

Re: transform columns in header

Hi

If someone have the same problem, there is my code :

tmp:

Generic LOAD * Resident tbl_source;

Result:

load distinct ID resident tbl_source;

drop table tbl_source;

FOR i = 0 to NoOfTables()

TableList:

LOAD TableName($(i)) as Tablename AUTOGENERATE 1

WHERE WildMatch(TableName($(i)), 'tmp.*');

NEXT i

FOR i = 1 to FieldValueCount('Tablename')

LET vTable = FieldValue('Tablename', $(i));

LEFT JOIN (Result) LOAD * RESIDENT $(vTable);

DROP TABLE $(vTable);

NEXT i

drop table TableList;

Thank you for your help

Cédric