Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Keys

Good Morning,

I have 3 data tables in Qlik, all of which have the same columns Building, Month, Year.

I have one table that holds customer details such as avg age, number of days, and accident rate, and another table that holds the totals and categories of the accidents.

How do I link the accident rate and avg age for a month from one table to the other?

When I load the data and link it, it tells me that the columns have the same headings but contain different data?

Thanks

Dan

5 Replies
Anonymous
Not applicable
Author

Could you post some sample data of your tables?

Not applicable
Author

I can only post empty tables as data is sensitive, but should give you an idea of the structure.

Anonymous
Not applicable
Author

You can create a composite key of Year, Month, Ship field like:

Year&'-'&Month&'-'&Ship as CompositeKey

It should work

Not applicable
Author

I'm dumb, how do I do that?

Anonymous
Not applicable
Author

Go to script level, you will be having these three tables their:

like:

load

Year,        //Comment or rename 3 field(Year,Month,Ship) as it creates synthetic key

Month,

Ship,

Year&'-'&Month&'-'&Ship as CompositeKey

from AccidentTable;

load

Year,         //Comment or rename 3 field(Year,Month,Ship) as it creates synthetic key

Month,

Ship,

Year&'-'&Month&'-'&Ship as CompositeKey

From IncidentTable;

load

Year,             //Keep these 3 field(Year,Month,Ship) as it .

Month,

Ship,

Year&'-'&Month&'-'&Ship as CompositeKey

From Day&AgeTable;