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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
phil-ebm
Creator
Creator

Transform Rows to Columns

Hi @All

I have following Data-Table (1.5 Million Rows)

DataTable.png

and i want to transform this into this

DataTable2.png

during the load in my datamodel:


I've tried it with Transformation -> Rotate (here it rotates the whole table but i only want to rotate the two marked columns) and Crosstable and couldn't find the right solution.

Then i found this way. Creating the Table Step by Step.

CAT:

LOAD ID_ARTIKEL as %KeyArtikel,

  MERKMAL as BAUGR

FROM

  [..\..\..\..\..\Data\epM\PROD1\qvd\CAT_MERKMAL.qvd](qvd)

WHERE CAT_KUZEI = 'BAUGR';

left join(CAT)

LOAD ID_ARTIKEL as %KeyArtikel,

  MERKMAL as CE

FROM

  [..\..\..\..\..\Data\epM\PROD1\qvd\CAT_MERKMAL.qvd](qvd)

WHERE CAT_KUZEI = 'CE';


It's working but i'm not satisfied with this  because i have to do this for every record in CAT_KUZEI and there are 462 distinct Values


Have someone here a sample or solution how i can transform my table to the right structure?


Thanks & Regards


Philipp



1 Solution

Accepted Solutions
Kushal_Chawda

Generic load will be helpful in this case

The Generic Load

View solution in original post

5 Replies
Chanty4u
MVP
MVP

petter
Partner - Champion III
Partner - Champion III

Cross Table is in the opposite direction - transforming rows to columns.

Kushal_Chawda

Generic load will be helpful in this case

The Generic Load

petter
Partner - Champion III
Partner - Champion III

The technique that dathu.qv‌ shows in this article should suit your needs fine: Re: Any alternate to Generic load? His suggestion is NOT a generic load but use GROUP BY.

phil-ebm
Creator
Creator
Author

I never heard from the Generic Load but it was exactly what i wanted.