Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
User0
Contributor III
Contributor III

link two tables with two fields

I have table A with 5 fields and B with 6 fields, Both tables contain separate data linked by date and Country.
If I try to load the data it makes a synthetic key from the date+country field.

A B
Date Date
Country Country
Order Manufacture
Cancel Faulty
Return Cost 
  Loss

 

How do i fix it please help , 
I need to load both the Country data because the country data in table A is in short form (like USA , FR,SGP,IND) and I have renamed them to their full forms as present in table B (like United States of America, France , Singaport, India).

How do i load my data without synthetic keys?

Labels (3)
7 Replies
Or
MVP
MVP

A synthetic key is not a problem, so you don't need to fix it. If you prefer to avoid a synthetic key, you can concatenate the two fields into one.

Note that this unrelated to the fact that your join will  be incorrect because the values in Country are different, so you'll probably want to rename one of the Country fields to [Country Shortname] or something along those lines. Renaming the field will avoid it being turned into a key, which you don't want it to be (again, because the values are not the same).

User0
Contributor III
Contributor III
Author

Hi , Thank you for the input . however I want only one country field to use as a global filter.

Or
MVP
MVP

Then you will need to translate one of the two sides to match the other side using a translation table or through whatever other means, as Qlik won't join "USA" to "United States of America".

User0
Contributor III
Contributor III
Author

While loading the data from table A, I have used 

Load

pick(match(Country,
'USA',FR','SGP'
), 'United States of America','France',India')as
Country;

Or
MVP
MVP

Assuming those are the correct matching values, the join should be applied correctly and there should be no problem, then.

User0
Contributor III
Contributor III
Author

Do I explicitly join them or let qlik handle it?

Or
MVP
MVP

Personally, I will let Qlik join fields based on identical field names without worrying about synthetic keys. I only worry about synthetic keys that show up unexpectedly. If the synthetic key bothers you for some reason, you can choose to create a composite key by concatenating the values or autonumbering them, but this isn't really necessary.