Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
shruthibk
Creator
Creator

How to convert cross table into straight table

Hi,

I have raw data available in a cross table format, now I want to load this cross table as straight table in QlikView.

Please guide me to perform this.

Thanks,

shruthi

1 Solution

Accepted Solutions
oknotsen
Master III
Master III

Interesting. You seemed to have found a bug.

I created a work-around. This script (tested) does the trick:

YourTable:
CrossTable(Year, Data, 1)
LOAD 1 as BogusField,
[2012],
[2013],
[2014]
FROM
CrossTable.xlsx
(
ooxml, embedded labels, table is Sheet1);

drop field BogusField;

May you live in interesting times!

View solution in original post

13 Replies
oknotsen
Master III
Master III

Assuming you are calling the top row "Year" and the values "Value", add this line directly ABOVE your load statement:

CrossTable(Year, Value, 0)

May you live in interesting times!
prma7799
Master III
Master III

CrossTable(Year, Data, 0)

LOAD [2012],

     [2013],

     [2014]

FROM..........

prma7799
Master III
Master III

PFA...

shruthibk
Creator
Creator
Author

Hi,thanks for your response but it is not giving the expected result.It is loading the data as it is.

expected output is

Year,Value

2012,10

2013,20

2014,30

2012,20

2013,30

2014,40

2012,40

2013,50

2014,60

thanks,

shruthi

shruthibk
Creator
Creator
Author

crosstable1.JPGcrosstable.JPG

prma7799
Master III
Master III

Can you please send some sample qvw file.

oknotsen
Master III
Master III

Interesting. You seemed to have found a bug.

I created a work-around. This script (tested) does the trick:

YourTable:
CrossTable(Year, Data, 1)
LOAD 1 as BogusField,
[2012],
[2013],
[2014]
FROM
CrossTable.xlsx
(
ooxml, embedded labels, table is Sheet1);

drop field BogusField;

May you live in interesting times!
shruthibk
Creator
Creator
Author

thanks,this code is working

prma7799
Master III
Master III

Hi Shruti,

Just try okg  Solution

Thanks