Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
Can you please help me understand how to achieve below data in Qlik?
I have a table with 7 types (AAA,BBB,CCC,DDD,EEE,FFF,VVV) and i want create a table in which each ID should be in all the types
for example -
Load * inline [
ID, Date1, Date2, Type
1, 01/02/2024, 01/01/2024, AAA
1, 01/06/2024, 01/71/2024, BBB
2, 01/12/2024, 01/21/2024, DDD
2, 01/16/2024, 01/11/2024, CCC
3, 01/02/2024, null , VVV];
I want to create a table like below
ID, Date1, Date2, Type
1, 01/02/2024, 01/01/2024, AAA
1, 01/06/2024, 01/71/2024, BBB
1, null , null , CCC
1, null , null , DDD
1, null , null , EEE
1, null , null , FFF
1, null , null , VVV
2, 01/12/2024, 01/21/2024, DDD
2, 01/16/2024, 01/11/2024, CCC
2, null , null , AAA
2, null , null , BBB
2, null , null , EEE
2, null , null , FFF
2, null , null , VVV
3, 01/02/2024, null , VVV
3, null , null , AAA
3, null , null , BBB
3, null , null , CCC
3, null , null , DDD
3, null , null , EEE
3, null , null , FFF;
Thanks in Advance
This would work:
Data:
Load * inline [
ID, Date1, Date2, Type
1, 01/02/2024, 01/01/2024, AAA
1, 01/06/2024, 01/17/2024, BBB
2, 01/12/2024, 01/21/2024, DDD
2, 01/16/2024, 01/11/2024, CCC
3, 01/02/2024, null , VVV
];
Types:
LOAD Type Resident Data;
Join (Types)
LOAD ID Resident Data;
Join (Types)
LOAD * Resident Data;
Drop Table Data;
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
This would work:
Data:
Load * inline [
ID, Date1, Date2, Type
1, 01/02/2024, 01/01/2024, AAA
1, 01/06/2024, 01/17/2024, BBB
2, 01/12/2024, 01/21/2024, DDD
2, 01/16/2024, 01/11/2024, CCC
3, 01/02/2024, null , VVV
];
Types:
LOAD Type Resident Data;
Join (Types)
LOAD ID Resident Data;
Join (Types)
LOAD * Resident Data;
Drop Table Data;
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com