Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
BTproj
Contributor
Contributor

Appending column from different tables - Qliksense

Hello People

I am importing different tables in to qliksense and joining them using Association in qliksense. Other than primary key which is used to join tables, i have a column in 2 tables which needs to be appended one below another.

I will explain the issue with an example,

I have 3 tables,

q11.PNGq12.PNGq13.PNG

i am joining these 3 tables using 'cid' which is the primary key. But column in table 1 - 'pid' and table 2 - 'product' are same, which contains product information. I need to append these columns one below another and make it as single column.

Data Model in qliksense

q14.PNG

 

Please let me know on how to handle this issue. Thanks in advance.

 

Labels (1)
1 Solution

Accepted Solutions
joseto00
Contributor II
Contributor II

Hello!, Table 1 and table 2 you have to concatenate them, then the result of this you must cross it with table 3. I copied the code ...

 

T1:
LOAD * Inline [

cid , pid , sale

1 , x1 , 120

2 , x2 , 340

3 , x3 , 100
];

T2:
LOAD * Inline [

cid , product , sale

1 , w12 , 100

2 , w13 , 200

3 , w14 , 300
];

T3:
LOAD * Inline [

cid , cnt

1 , rf

2 , rg

3 , rh

];


Concatenate(T1)
load cid, product as pid ,sale resident T2;

left join(T1)
load cid, cnt resident T3;

DROP TABLE T2;DROP TABLE T3Concatenate.png

View solution in original post

2 Replies
joseto00
Contributor II
Contributor II

Hello!, Table 1 and table 2 you have to concatenate them, then the result of this you must cross it with table 3. I copied the code ...

 

T1:
LOAD * Inline [

cid , pid , sale

1 , x1 , 120

2 , x2 , 340

3 , x3 , 100
];

T2:
LOAD * Inline [

cid , product , sale

1 , w12 , 100

2 , w13 , 200

3 , w14 , 300
];

T3:
LOAD * Inline [

cid , cnt

1 , rf

2 , rg

3 , rh

];


Concatenate(T1)
load cid, product as pid ,sale resident T2;

left join(T1)
load cid, cnt resident T3;

DROP TABLE T2;DROP TABLE T3Concatenate.png