Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table Entries as Columns in QlikView Load Script

Hello, i have two Tables

... a Dimension Table .. (variable)

[DIMID, DIMTXT]

1, Height

2, Width

3, Length

4, Diameter

5, ...

6, ...

and a Table with Products and 4 Dimensions (fixed)

[ARTID, ARTNR, ARTDIM1, ARTDIM1VAL, ARTDIM2, ARTDIM2VAL, ARTDIM3, ARTDIM3VAL, ARTDIM4, ARTDIM4VAL]

1, 100, 1, 10, 2, 50,NULL, NULL, NULL, NULL

2, 110, 3, 1000, NULL, NULL ,NULL, NULL, 4, 20

What i want is a Table that has all Products + All Dimensions .. (when there is no entry .. then there is a NULL Value or something)

[ARTID, ARTNR, HEIGHT, WIDTH, LENGTH, DIAMETER, ..., ...]

1, 100, 10, 50, NULL, NULL, NULL, ..., ...

2, 110, NULL, NULL, 1000, 20, ... ,...

The Final Table (Dimension Columns) should be dynamic Generated by QV depending on the Dimension Table..

Much appreciate any hints how to transform a Table like this, i have no clue how to start.

Thank you!

2 Replies
Not applicable
Author

This Posting gave me some hint.. Dynamic Field Name in Load Script

i could create the Fields by runtime... but i am stucking at doing something like..

LOAD *,

if(len(ARDIM1)>0, ARABM1, '') as ApplyMap('MAP_Dimensionen_KXT',ARDIM1)

or

Let MyDim = ApplyMap('MAP_Dimensionen_KXT',ARDIM1);

  if(len(ARDIM1)>0, ARABM1, '') as $(MyDim);

;

SQL

Select ...

what can i do to fill my fields "variable" ?

Not applicable
Author

This was a fail.. cause this gernerates a preceeding load which bloats up my table.. (for every Article Entry i got n-Dimension Entrys).