Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Not applicable

Moving column headers to row values - load script

Hello,

I have an Excel data source that looks like follows:

Country2007-00-00-002008-00-00-002009-00-00-00
Bahrain8.3%6.2%2.5%
Egypt, Arab Rep.7.1%7.2%4.7%

I need to create a column called 'Year' so that I can use this field as a filter and dimension.

I would like my table to be loaded in as follows:

CountryYear%
Bahrain

2007

8.3%
Bahrain20086.2%
Bahrain20092.5%
Egypt, Arab Rep.20077.1%
Egypt, Arab Rep.20087.2%
Egypt, Arab Rep.20094.7%

Without changing the data source, is there a way to achieve this in the load script?

Many thanks

Melissa

1 Solution

Accepted Solutions
qlikrajan
Contributor III

Re: Moving column headers to row values - load script

When you load table in script editor then in File wizard you will find Crosstable option. Using Crosstable you can bring year into one column.

View solution in original post

3 Replies
qlikrajan
Contributor III

Re: Moving column headers to row values - load script

When you load table in script editor then in File wizard you will find Crosstable option. Using Crosstable you can bring year into one column.

View solution in original post

qlikrajan
Contributor III

Re: Moving column headers to row values - load script

Please find a samle app attached.

Not applicable

Re: Moving column headers to row values - load script

That's brilliant, thanks QlikRajan!