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

How to get a transposed result

Hi,

I have this table (from excel):  

         

Customer   SegmentLocal CodeQTA JAN 2015QTE FEB 2015QTE MAR 2015

   AA                                  123                    2                         6                                   2

  BB                                    123                  10                       10                                  20

  BB                                     256                  20                       30                                40   

How can i do to get this result :

  Customer       LocalCode       MONTH    QTE

  AA                     123                    1           2             

  AA                     123                    2           6      

  AA                     123                    3           2           

  BB                      256                  1            10

  BB                      256                  2            10

  BB                      256                  3             20

...................................

Thanks for your help.     

1 Solution

Accepted Solutions
qlikrajan
Contributor III

Re: How to get a transposed result

Hi:

You can do it with the help of crosstabble.Click on the Table Files in Script editor to load the data, then load the file and go to File Wizard: options, click Crosstable tab, there you can select qualifier fields, attribute field, and Data field as per your requirement. Let me know if that's what you were looking for. I have attached the sample app and data.

Best,

2 Replies
Employee
Employee

Re: How to get a transposed result

You need to use a CROSSTABLE load.  Its available when you select a file source, click next twice and hit the crosstable button.

That allows you to pivot the fields of your choice into a new column

Untitled.png

qlikrajan
Contributor III

Re: How to get a transposed result

Hi:

You can do it with the help of crosstabble.Click on the Table Files in Script editor to load the data, then load the file and go to File Wizard: options, click Crosstable tab, there you can select qualifier fields, attribute field, and Data field as per your requirement. Let me know if that's what you were looking for. I have attached the sample app and data.

Best,