Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikLearner21
Contributor
Contributor

Join table to two other tables

Hi.

I am re-starting my Qlikview knowledge so not a complete beginner but a beginner none-the-less!

I have a question re a load script.  

I have a 'Main' data table (in Excel for now but will be a SQL connection when fully working) and 2 separate Excel 'look-up' tables.  The join to the first table is straight forward however the second join requires linking to one variable in the Main data and another in the first look-up.

For example.  The Main table has a "Company" field and a "Product" field.  In the first lookup, I am 'cleaning' the company name, so "Ford Motor Co" returns "Ford" and so on.  

The second look-up needs to join on the "Company_Cleaned" field (i.e. the "Ford" rather than "Ford Motor Co" and on the Product in Main.

I have searched many answers but I cannot seem to find out how to do it.  I suspect I am missing something very basic!

Thanks in advance

 

1 Solution

Accepted Solutions
rubenmarin

Hi, If you have  Main table with "Company" and "Product" field, you do a join (left or inner) with the first excel, that has a "Camponay" and a "Company_Cleaned" field this add the "Company_Cleaned" field to the Main table, then the last excel has a "Company_Cleaned" and a "Product" field. If you do a join with the main table it should add all the fields from this table to the main table.

Possible issues can be:

- Fields have not the same name

- Values are slightly different (uppercases, spaces, symbols...). 

- First excel add another field with the same name as inthe 2nd excel, so it also looks for the same values to do the join.

You haven't said what kind of issue you found, a sample data or document to demonstrate the issue can be helpful to find the solution.

View solution in original post

2 Replies
rubenmarin

Hi, If you have  Main table with "Company" and "Product" field, you do a join (left or inner) with the first excel, that has a "Camponay" and a "Company_Cleaned" field this add the "Company_Cleaned" field to the Main table, then the last excel has a "Company_Cleaned" and a "Product" field. If you do a join with the main table it should add all the fields from this table to the main table.

Possible issues can be:

- Fields have not the same name

- Values are slightly different (uppercases, spaces, symbols...). 

- First excel add another field with the same name as inthe 2nd excel, so it also looks for the same values to do the join.

You haven't said what kind of issue you found, a sample data or document to demonstrate the issue can be helpful to find the solution.

QlikLearner21
Contributor
Contributor
Author

Hi. Yes a left join to the main table worked.  

Thanks for your help!