Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Zirva
Contributor III
Contributor III

Dataloading and synthetic keys

I have multiple qvds uploaded in my data load editor with each qvd containing a few datapoints that have similar data but different column names. I created aliases for each to join each other but that created multiple synthetic keys. I want to join these tables so that these common fields can become filters on the dahboard. I can not concatenate the tables since the names are not the same in each table. Adding an example of data below. 

Table 1: 
Load
ProductName
Sales
Cost
Projects
City
From[Source]

Table 2:
Load
Products
Profit
Cost
SKU
ProjectName
CityName

Table3: 
Product
PersonID
PersonName
CityEnName
Project

The filters that I want to create are Product Names, Project Names & City Name. 
Please suggest how. I also tried creating joins but creating multiple joins for more than 20 tables doesn't work either. 

5 Replies
pravinboniface
Creator II
Creator II

@Zirva It's hard to suggest without looking at all the tables, but have you tried creating composite keys to help the tables join:

For eg. Product_ID & '|'&Region_ID AS tableA_Key

Zirva
Contributor III
Contributor III
Author

@pravinboniface for that shouldnt I have the same fields in each of the table and with the same column name? In my case, one table has Product, one has Products & one has ProductName. Some tables have 3 columns in common while some have more or less. So creating one composite key in all the tables might not be possible. Do you suggest making seperate composite keys in each table? in that case, how will the tables joins with each other?

pravinboniface
Creator II
Creator II

@Zirva If Product, Products, and ProductName are the same, then you can alias them to match in all tables.  However, when you say some have 3 columns in common and some have less than 3 in common, it sounds look there is differing granularity and you will have to create link tables to manage it.  Once you create the link tables to join the tables, you should then be able to use the common fields are filters.  You can find many articles in the forum on link tables if you are not already familiar with it.

Zirva
Contributor III
Contributor III
Author

When I make the same key using aliases, it gives me error. For eg, if the key is 
Productname&RegionName&CityName as Key

but in the table i have CityArName as CityName, it doesnt recognise CityName in the key 

pravinboniface
Creator II
Creator II

@Zirva You have to use the pre-alias name, namely CityArName.  So something like:

Productname&RegionName&CityArName