Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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.

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.

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!

Community Browser