Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
balrajahlawat
Esteemed Contributor

Re: Data Keys

Could you post some sample data of your tables?

Not applicable

Re: Data Keys

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

balrajahlawat
Esteemed Contributor

Re: Data Keys

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

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

It should work

Not applicable

Re: Data Keys

I'm dumb, how do I do that?

balrajahlawat
Esteemed Contributor

Re: Data Keys

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;

Community Browser