Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
manideep78
Partner - Specialist
Partner - Specialist

Cross table relationship - Immediate help will be appreciated

Dear Community,

I have 2 tables

Table1:

 

IDABCTarget
1A1B1C1Yes
2A1B1C1No
3A1B1C1Yes
4A1B2C1No
5A1B2C1Yes
6A2B2C2Yes
7A2B2C2Yes
8A2B2C2No
9A2B3C2No
10A2B3C3No
11A2B3C3No
12A2B3C3Yes
13A3B3C4No
14A3B4C4Yes
15A3B4C4Yes

Table2:

 

Col1Col2
A10
B9
C8

The columns in table 1 are rows in my table2. Each row in table 2 has some score to say whether its important to consider or not.

The output table should be like below

Output table:

  

Col1Col2TargetCount(Taget)
AA1Yes
No
A2Yes
No
A3Yes
No
BB1Yes
No
B2Yes
No
B3Yes
No
B4Yes
No
CC1Yes
No
C2Yes
No
C3Yes
No
C4Yes
No

I appreciate your help.

Thanks,

Manideep

1 Reply
Sergey_Shuklin
Specialist
Specialist

Hello!

PFA.

You can use this script for solving this task:

CrossTable(Col1,Col2)

t:

LOAD ID,

     A

     ,B

     ,C

     //,Target

FROM

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

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

CrossTable(Col3,Col2)

LOAD

Target

     ,A

     ,B

     ,C    

FROM

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

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

Left Join(t)

sorting:

LOAD Col1,

     Col2 as SortLVL

FROM

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

(html, codepage is 1251, embedded labels, table is @2);

The result will be:

cross_table.png