Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

issue - Left join becomes Cartesian Production

Hi all,

I have below issue.

below is the descriptions.

I have two table like below,

both contains product.

Table 1 contains all products.

Table 2 contains product which was bought by customer.

I would like to left join Table 1 with Table 2.

I would like to add flag field which indicates product was bouth by customer or not.

below is the example.

 

NoConcatenate

Table1:

Load

Product

Resident T1;

 

NoConcatenate

Table2:

Load

Product

Resident BoughtByCust;

I am trying below.

but not getting desired results and it shows cartesian product.

 

NoConcatenate

Table3:

Load

*

resident Table1;

left join

Load

*

resident Table2;

I would like to get below output.

Product (From T1)      Product(from BoughtByCust)   Flag

   ABC                                     ABC                          Y

   DEF                                     DEF                           Y

   GHI                                         -                              N    <-- this product was not exist in BoughtByCust table so it should show N in flag field.

how can we achive like above ?

any help ?

Thanks!.

1 Reply
marcus_sommer

Joins are often not neccessary in qlikview. Why do you used not sales as fact-table and products as dimension-table in your datamodel. The most calculations could be done in gui-objects and if you used an additional product-field beside your product-key like product as ProductFromSales you could differentiate and decide from which table you takes your field.

- Marcus