Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

victor_greffet
New 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
Esteemed Contributor

Re: Multiple Load keeping inital matrix

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;

6 Replies

Re: Multiple Load keeping inital matrix

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
Esteemed Contributor

Re: Multiple Load keeping inital matrix

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;

atkinsow
Valued Contributor II

Re: Multiple Load keeping inital matrix

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
Valued Contributor III

Re: Multiple Load keeping inital matrix

[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];

MVP
MVP

Re: Multiple Load keeping inital matrix

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
New Contributor III

Re: Multiple Load keeping inital matrix

you're right, i missed the concatenate statement

Thank you, it works

Community Browser