Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
heid_f
Contributor III
Contributor III

FOR EACH in LOAD Script

Hey all,

I'm trying to create a table with dynamic count of columns (regarding another table).

We have to tables, our characteristics and our articles.

We want to build:

Articles:

Load *,

    FOR EACH characteristic: ApplyMap('', characteristic)

FROM any qcd file.

 

Is this possible to create?

Thanks four your answers and Best Regards

1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi Heid,

I would use Generic Load for this and join all values together. Maybe if you have some example data we can build an example app for you.

Jordy

Climber

Work smarter, not harder

View solution in original post

4 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Heid,

I would use Generic Load for this and join all values together. Maybe if you have some example data we can build an example app for you.

Jordy

Climber

Work smarter, not harder
heid_f
Contributor III
Contributor III
Author

Hi Jordy,

thanks for your reply. I attached an app with some example data and marked to position, where I want to add the ApplyMaps.

Best Regards,

Fabian

JordyWegman
Partner - Master
Partner - Master

Hi Fabian,

Can't we join the data this way? This will also give you all possibilities.

Assignment:
LOAD * INLINE [
	Number, Leiste, Merkmal, Return_Value
    1010101010, VERWEND, BENDER, yes
    1010101010, VERWEND, GEWA, yes
    1010101010, VERWEND, IESY, no
    1010101010, VERWEND, INTECH, no
    2020202020, VERWEND, BENDER, no
    2020202020, VERWEND, GEWA, yes
    2020202020, VERWEND, IESY, yes
    2020202020, VERWEND, INTECH, yes
    3030303030, VERWEND, BENDER, yes
    3030303030, VERWEND, GEWA, no
    3030303030, VERWEND, IESY, no
    3030303030, VERWEND, INTECH, yes
];

Left Join( Assignment ) //Merkmale:
LOAD * INLINE [
	Firm, Cat, Leiste, Merkmal, Name
    100, SAR, VERWEND, BENDER, Projekt Bender
    100, SAR, VERWEND, GEWA, Projekt Gewa
    100, SAR, VERWEND, IESY, Projekt Iesy
    100, SAR, VERWEND, INTECH, Projekt Intech
];


Artikel:
LOAD * INLINE [
	Firm, Number, Cat, Name, Price
    100, 1010101010, Television, HD TV 43, 143.99
    100, 2020202020, Television, HD TV 49, 199.99
    100, 3030303030, Radio, DHB+ Radio, 99.99
]
;

Drop field Cat from Assignment;
Drop field Name from Assignment;

Left Join ( Artikel )
Load
	*
Resident Assignment
;

Drop table Assignment;

 

Jordy

Climber

Work smarter, not harder
heid_f
Contributor III
Contributor III
Author

Hi Jordy,

unfortunately for each line in Merkmale we need a column in Artikel with the corresponding return_value. So a Join is not a solution.

Best Regards,

Fabian