Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Resultant from 2 Tables not fully linked.

Hi All,

I have 2 Tables - Table 1 and Table 2

In Table 1 - Mapping Table,

There are 4 fields

   

Mapping1Mapping2Value1Value2
AAA99.00%344
BBB89.00%45
CCC95.00%55
DAA94.50%65
ECC98.00%43
FDD99.50%436
GEE98.50%655

Two of them - Mapping1 and Mapping2 are used to Map different tables.

Also Combination of Mapping1 and Mapping2 forms a uniqueID.

In Table2 - Main Table,

There are 6 fields

   

IDColumn1Col2_Mapping1CompanyNameColumn3Column4
14ZCompany11664
25BCompany220100
36ACompany324144
47GCompany428196
52JCompany5816
65DCompany220100
73KCompany41236
85GCompany220100

ID is the primary key,

Column1 is the data pertaining to UniqueID

Col2_Mapping1 has the mapping same as Mapping1  in Table1

Column3 is derived from Column1

Column4 is derived from Column1 and Column3

Required Output:    

Mapping1Mapping2Value1Value2Sum(Column1) from Table 2Count(Column4) from Table 2Sum(Column3) from table 2
AAA99.00%344
BBB89.00%45
CCC95.00%55
DAA94.50%65
ECC98.00%43
FDD99.50%436

Mapping1 From Table1

Mapping2 From Table1

Value1 From Table1

Value2 From Table1

Sum(Column1) From Table2  ---- How to get this?

Count(Column4) From Table2  ---- How to get this?

Sum(Column3) From Table2  ---- How to get this?

if any Mapping1 (or Col2_Mapping1 in Table 2) doesn't have any value in Column1 then it should be 0.

Attached Sample data.

Hi stalwar1‌ , Please check if you can help.

Regards,

Anjali Gupta

11 Replies
Not applicable
Author

Thanks a lot Kushal. This worked for me.

Regards,

Anjali Gupta

Kushal_Chawda

awesome