Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
girish_talele
Creator
Creator

Join Two Table Data

Dear Experts,

I want to join two tables, first contains Bill Of Material & second contains Order Issue Data.

I want to compare Required v/s Actual Issue data.

The Data in BOM & Order Issue is as given below:-

Snap1.JPG.jpg

Resulting table required as given below:-

Snap2.JPG.jpg

Please help in the same.

1 Solution

Accepted Solutions
girish_talele
Creator
Creator
Author

Dear All,

Thanks for helping, As Mark said, the requirement was quite odd.

I Manage to derive required result (although with too many table).

Thanks for your support.

Regards,

Girish.

View solution in original post

12 Replies
Not applicable

The result is comes by joining the two tables

By using Outer join we can get the above Result

mjayachandran
Creator II
Creator II

Check attached :

Just use Outer join

girish_talele
Creator
Creator
Author

Dear Sasikumar & Mahesh,

By Outer Join or making common field, the data is not getting arranged in desired manner.

For each row of first table, second tables all rows are getting repeated. And hence the 60 rows are populated.

Any other solution ???

jagan
Partner
Partner

Hi,

Try this script

BOM:

Load

P_MatId,

P_PrdNo,

P_MatId  & P_GICompId AS Key,

P_GICompId,

P_CompGIQty

Inline [

P_PrdNo, P_MatId, P_GICompId, P_CompGIQty

Ord1, Mat1, Comp1, 10

Ord1, Mat1, Comp2.1, 20

Ord1, Mat1, Comp3, 30

Ord1, Mat1, Comp4, 40

Ord1, Mat1, Comp4.1, 40

Ord2, Mat2, Comp5, 50

Ord2, Mat2, Comp6.1, 60

Ord2, Mat2, Comp7, 70

Ord2, Mat2, Comp8, 80

Ord2, Mat2, Comp8.1, 80

Ord3, Mat1, Comp1, 10

Ord3, Mat1, Comp2.1, 20

Ord3, Mat1, Comp3, 30

Ord3, Mat1, Comp4, 40

Ord3, Mat1, Comp5.1, 40

];

LEFT JOIN

Load * ,

B_MatId  & B_CompId AS Key

Inline [

B_MatId, B_CompId, B_CompReqQty

Mat1, Comp1, 10

Mat1, Comp2, 20

Mat1, Comp3, 30

Mat1, Comp4, 40

Mat2, Comp5, 50

Mat2, Comp6, 60

Mat2, Comp7, 70

Mat2, Comp8, 80

];

Regards,

Jagan.

girish_talele
Creator
Creator
Author

Dear Jagan,

The Join is not Woking, e.g in Left Join the "Comp2" is missing.

snap3.JPG.jpg

girish_talele
Creator
Creator
Author

Dear Experts,

Any other solution???

saradhi_it
Creator II
Creator II

Did you used force concatnation

girish_talele
Creator
Creator
Author

No,

How to use force concatenation.

Please suggest.

saradhi_it
Creator II
Creator II

concatenation won't work for u r requirement use straight table that is best...bcos you can shift rows as you want,,,,,,