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

DateLink with different Keys

Hi, All I have used a datelink/datebridge in my model. This datelink contains a DateLink, Date and DateType.

On the basis of DateLink it is connected with one Final Table.

 

Final_Temp:

Load ref_id, license_no,State, Other_Details...... from Final.qvd;

Left join Load ref_id,inspection_id, ref_id&inspection_id as %Inspection_Key from Inspection.qvd;

 

Final:

Load *, ref_id&license_no as DateLink resident Final_Temp;

Drop Table Final_Temp;

 

--------------------

Inspection:

Load inspection_id,ref_id,ref_id&inspection_id as %Inspection_Key from Inspection.qvd;

 

------------

DateLink:

Load ref_id&license_no as DateLink, Date1 as Date, 'Date1' as DateType from Final;

Concatenate

Load ref_id&license_no as DateLink, Date2 as Date, 'Date2' as DateType from Final;

Concatenate

Load ref_id&inspection_id as DateLink, "Inspection Date" as Date, 'Inspection Date' as DateType from Final;

***********************

Now Calendar Table is linked with Date Field of this DateLink Table and in charts I use count({<DateType={'Inspection Date'}>} inspection_id)

 

Now problem is if I use ref_id&inspection_id as DateLink instead of ref_id&license_no in Final Table, data for Inspection sheet will come, but it won't come without that. 

 I have tried to use above logic by concatenating the Inspection table with Final and use ref_id&inspection_id as DateLink but corresponding data of final table get's lost in this way as they is no link.

 

Final:

Load *, ref_id&license_no as DateLink ..................... resident Final_Temp;

Concatenate

Load ref_id&inspection_id as DateLink from Inspection;

 

 

Please suggest me some alternative, I have many dates and table which will connect with is DateLink Table and each may use ref_id&license_no as DateLink or not or have something like this ref_id&T1 as DateLink, ref_id&T2 as DateLink, license_no&T3 as DateLink, as each table contains one id which can be linked to Final Table and one id from it's own table to identify unique record. This auxillary tables may contain many records for one ref_id of Final Table but each one identifiable by there record_id of that table and have unique date for each record_id.

 

Hope I have explained my question well.

Thanks & Regards,
Please Accepts as Solution if it solves your query.
Labels (3)
0 Replies