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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
victor_greffet
Partner - Contributor III
Partner - Contributor III

Multiple Load keeping inital matrix

Hi community,

I'm stuck on a something simple but i need your help, what I would like to do :

My initial matrix is:

ID

Step
1A
2B
3C
...D
nn

I would like :

IDTestlevel
1ALevel 1
2BLevel 1
3CLevel 1
...DLevel 1
nnLevel 1
1

A

Level 2
2B

Level 2

3CLevel 2
...DLevel 2
nnLevel 2
1ALevel 3
2BLevel 3
3CLevel 3
...DLevel 3
nnLevel 3

(Repeat initial matrix with attribute level, 1 to 3)

I tried :

[Feuil1]:

LOAD *

FROM [lib://Downloads/test.xlsx]

(ooxml, embedded labels, table is Feuil1);

Load

*,

'Level 1' as level

resident Feuil1;

Load

*,

'Level 2' as level

resident Feuil1;

Load

*,

'Level 3' as level

resident Feuil1;

But I have Syn1 Table created in my data model :

Capture.PNG

I'd like to clean that,

Do you have an idea ?

Thanks,

Victor

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,


you just missed the CONCATENATE statement

test:

LOAD ID,

     Step,

     'Level1' as level

FROM

[https://community.qlik.com/thread/286002]

(html, codepage is 1252, embedded labels, table is @1);

Concatenate


LOAD ID,

     Step,

     'Level2' as level

Resident test;


Concatenate


LOAD ID,

     Step,

     'Level3' as level

Resident test;

View solution in original post

6 Replies
Anonymous
Not applicable

Maybe something like this :

[Temp]:

LOAD *

FROM [lib://Downloads/test.xlsx]

(ooxml, embedded labels, table is Feuil1);

[Feuil1]:

NoConcateante

Load

*,

'Level 1' as level

resident Temp;

Concatenate ( [Feuil1] )

Load

*,

'Level 2' as level

resident Temp;

Concatenate ( [Feuil1] )

Load

*,

'Level 3' as level

resident Temp;

Drop Table [Temp] ;

YoussefBelloum
Champion
Champion

Hi,


you just missed the CONCATENATE statement

test:

LOAD ID,

     Step,

     'Level1' as level

FROM

[https://community.qlik.com/thread/286002]

(html, codepage is 1252, embedded labels, table is @1);

Concatenate


LOAD ID,

     Step,

     'Level2' as level

Resident test;


Concatenate


LOAD ID,

     Step,

     'Level3' as level

Resident test;

Anonymous
Not applicable

Or you could do

[Feuil1]:

LOAD *

FROM [lib://Downloads/test.xlsx]

(ooxml, embedded labels, table is Feuil1);

Join([Feuil1])


LOAD * INLINE [

    level

    Level1

    Level2

    Level3

];

pradosh_thakur
Master II
Master II

[Feuil1]:

LOAD *

FROM [lib://Downloads/test.xlsx]

(ooxml, embedded labels, table is Feuil1);

load *,subfield('Level 1,Level 2,Level 3',',') as Level

resident  [Feuil1] ;
drop table [Feuil1];

Learning never stops.
maxgro
MVP
MVP

Another solution could be

est:

LOAD ID,

     Step

FROM [https://community.qlik.com/thread/286002] (html, codepage is 1252, embedded labels, table is @1);

join (est) LOAD

     'Level ' & rowno() as Level

AutoGenerate 3;

victor_greffet
Partner - Contributor III
Partner - Contributor III
Author

you're right, i missed the concatenate statement

Thank you, it works