Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Transponse Excel rows and Columns

Hi all Qlik Guru's

I have a requirement where I need to load excel data and transpose the columns and rows. I used the wizard transformation enable step and did a rotate and transpose step in the wizard. The rows and columns I have is like below.

   

Dateproduct1product2
29/02/2016464952
01/03/2016306618
02/03/2016141268843
03/03/201686243516
04/03/2016174226639
05/03/201626394
06/03/201622491
07/03/2016348420167
08/03/2016187272833
09/03/20165172

But  i want like this   

Date29/02/201601/03/201602/03/201603/03/201604/03/201605/03/201606/03/201607/03/201608/03/201609/03/2016
product114186174348187
product246495230661826884324351622663926394224914201672728335172

I'm getting the data like above,  but unfortunately the dates are converting into numbers during load script like this: Bold one

LOAD Date as Channel_Desc,

    [42429.000000],

     [42430.000000],

     [42431.000000],

     [42432.000000],

     [42433.000000],

     [42434.000000],

     [42435.000000],

     [42436.000000],

     [42437.000000],

     [42438.000000]

my question is :

1) How can we retain the date column as dates instead of numbers.

2) Secondly how can I change the number to date column like above as final output

Your help is really needed. Please advse

1 Solution

Accepted Solutions
sunny_talwar

Fix the dates in the resident Load after you do your CrossTable Load

Table:

CrossTable(Date, Value)

LOAD Date as Channel_Desc,

    [42429.000000],

     [42430.000000],

     [42431.000000],

     [42432.000000],

     [42433.000000],

     [42434.000000],

     [42435.000000],

     [42436.000000],

     [42437.000000],

     [42438.000000]

FROM Excel;


FinalTable:

NoConcatenate

LOAD Channel_Desc,

          Date(Num#(Date, '##')) as Date

          Value

Resident Table;


DROP Table Table;


View solution in original post

2 Replies
sunny_talwar

Fix the dates in the resident Load after you do your CrossTable Load

Table:

CrossTable(Date, Value)

LOAD Date as Channel_Desc,

    [42429.000000],

     [42430.000000],

     [42431.000000],

     [42432.000000],

     [42433.000000],

     [42434.000000],

     [42435.000000],

     [42436.000000],

     [42437.000000],

     [42438.000000]

FROM Excel;


FinalTable:

NoConcatenate

LOAD Channel_Desc,

          Date(Num#(Date, '##')) as Date

          Value

Resident Table;


DROP Table Table;


Not applicable
Author

Hi Sunny,

Thanks a lot. It worked