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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

From row to column

Hello

I have a problem to solve where might someone is able to give me a hint.

Current situation (Example):

ItemCode     /     Manufacturer      /    ManufacturerOrderCode

1111111               AAA                         XY2A

1111111               BBB                         Z3ZZ

1111111               CCC                         1XYA

2222222               HHH                         L1LL

2222222               GGG                        L1LL

3333333               ZZZ                         Z4Z3Z

What i need at the end:

ItemCode          Manufacturer1        ManufacturerOrderCode1     Manufacturer2        ManufacturerOrderCode2     Manufacturer3        ManufacturerOrderCode3

1111111            AAA                         XY2A                                   BBB                    Z3ZZ                                   CCC                         1XYA

2222222            HHH                         L1LL                                    GGG                    L1LL

3333333            ZZZ                         Z4Z3Z

It means I would like to get for each Manufacturer and ManufacturerOrderCode an extra column instead of a new row.

Thanks in advance

BR

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Wrecking the data model like that sounds like an exceedingly bad idea to me. Try using a pivot table instead. See attached example.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
shree909
Partner - Specialist II
Partner - Specialist II

Hi i think u need to  use generic load to get the data  with the above format...

Not applicable
Author

A:

LOAD

ItemCode,

Manufacturer,

ManufacturerOrderCode

FROM TABLE1;

Generic load  ItemCode,

        'Manufacturer ' &  ItemCode,

     Manufacturer

resident A;

Generic load  ItemCode,

        'ManufacturerOrderCode ' &  ItemCode,

     ManufacturerOrderCode

resident A;

Not applicable
Author

Many thanks for your idea!

The problem is that I have more than 200'000 rows in my table which has to be transformed. Any faster and slimer solution?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Wrecking the data model like that sounds like an exceedingly bad idea to me. Try using a pivot table instead. See attached example.


talk is cheap, supply exceeds demand
Not applicable
Author

That is exactly the solution for what I was looking for!

Many thanks!