Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
---|---|
1 | A |
2 | B |
3 | C |
... | D |
n | n |
I would like :
ID | Test | level |
---|---|---|
1 | A | Level 1 |
2 | B | Level 1 |
3 | C | Level 1 |
... | D | Level 1 |
n | n | Level 1 |
1 | A | Level 2 |
2 | B | Level 2 |
3 | C | Level 2 |
... | D | Level 2 |
n | n | Level 2 |
1 | A | Level 3 |
2 | B | Level 3 |
3 | C | Level 3 |
... | D | Level 3 |
n | n | Level 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 :
I'd like to clean that,
Do you have an idea ?
Thanks,
Victor
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;
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] ;
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;
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
];
[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];
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;
you're right, i missed the concatenate statement
Thank you, it works