Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bringing 2 tables together with similar structure

Hi

In our company we have branches that operate independently however they have the same structure.  I want to combine the 2 difference data source.

Attached herewith is the mock model which are link to 2 data sources.   The one is Joburg and the other is Durban.

The are 3 tables for each data source.

1. Sales Data:           Containing Customer, Item Code and Sales Qty

2. Customer Data:  Customer and Customer Group

3.Item Data:              Item Code and Item Category

When I reloaded the model, ITEM Category, Customer Group and “Renewable” under Division does not appear for Durban.  Please can you tell me where I am going wrong in my scripting.

Kind regards

Nayan

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Nayan,

Please check now.

Regards,

Greeshma

View solution in original post

14 Replies
Anonymous
Not applicable
Author

Hi,

You need to concatenate the tables first and then apply the joins. PFA.

Regards,

Greeshma

Not applicable
Author

Hi Greeshma

I have tried that. I got the Item Category to show, however the customer group is not showing. See attached.

Kind regards

Nayan

Not applicable
Author

Hi Greeshma

Sorry, did not see your file attached. I was working off my work email.  Will look at your model.

regards

Nayab

Not applicable
Author

Hi Greeshma

Thank you for your reply.  On your model, Item Category is not displaying.

kind regards

Nayan

Anonymous
Not applicable
Author

Hi Nayan,

Sorry i missed that. Let me check.

Regards,

Greeshma

Anonymous
Not applicable
Author

Hi Nayan,

Please check now.

Regards,

Greeshma

Not applicable
Author

Hi Greeshma

It worked . Thank you. Can you explain the joins / concatenate functions.

For the Joburg Customer & Item Data Tables, you don’t say Concatenate . However for the Durban Customer & Item Data Field you say Concatenate. Also would like to know to which table is this concatenation.

Kind regards

Nayan

Not applicable
Author

Hi,

Try this script.

[Jhb Source Data]:

LOAD [Data Source],

     Customer,

     [Item Code],

     [Sales Qty]

    

FROM

[Jhb Source Data (combine tables).xlsx]

(ooxml, embedded labels, table is [sales data]);

add

LOAD [Data Source],

     Customer,

     [Item Code],

     [Sales Qty]

FROM

[Durban Source Data (combine tables).xlsx]

(ooxml, embedded labels, table is [sales data]);

Anonymous
Not applicable
Author

Hi Nayan,

Since the columns are for the tables are the same in both the data sources, I have first concatenated the similar tables. So, first I am loading Joburg Sales Data and concatenating Durban Sales Data to this table. Next I have loaded Customer  Data for Joburg and conctenated Customer Data for Durban to this table. Similarly for Item data. Once this is done you will have 3 tables i.e. Sales, Customer  and Item. These 3 tables will have data from both the sources. Once the data for similar tables are brought together, the joins are performed. This will work even if you don't give the concatenate command, as tables will same column names will get auto concatenated.

Regards,

Greeshma