Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Could you post some sample data of your tables?
I can only post empty tables as data is sensitive, but should give you an idea of the structure.
You can create a composite key of Year, Month, Ship field like:
Year&'-'&Month&'-'&Ship as CompositeKey
It should work
I'm dumb, how do I do that?
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;