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

Can I control two objects with the same filter if the objects reference different tables?

  Do the tables need to be joined?

Example:  

Table 1:

Country  Hospitals
USA           St Francis Hospital
USA           Thomas Jefferson Med. Center
Canada     Montreal Medical Center




Table 2:

Country  Num_of_Patients
USA           250,000,000
Canada    90,000,000




There are other visualization platforms where I can load the two tables without joining them, and then define the filters to control elements in both tables.  

Is this possible in Qlik Sense?  Or do I need to join the tables when I load the data?

If I do join the tables, do he joined fields have to have the same exact name?  Or is there a way to define them to be the same field?  (ie Country in one table might be called Country_Name in another).

Thanks!







1 Solution

Accepted Solutions
ArnadoSandoval
Specialist II
Specialist II

Hi @BarryPollock 

Qlik Engine is based in an Associative Model (The Associative Difference ), basically tables are associated by commonly named columns, in your example, the column "Country" is common to both tables; "Hospitals" and "Num_of_Patients", so when you select 'USA' you will be working with two hospitals from USA and one single row for the Number of Patients.

Your script load the "Hospital" and "Num_of_Patients" tables and Qlik internally associated these tables on the "Country" Column.

You need to read more theory on how to handle scenarios when tables contains more than one common column, associating tables in these cases is as simple as aliasing the column within the load script.

Hope this helps, 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.

View solution in original post

1 Reply
ArnadoSandoval
Specialist II
Specialist II

Hi @BarryPollock 

Qlik Engine is based in an Associative Model (The Associative Difference ), basically tables are associated by commonly named columns, in your example, the column "Country" is common to both tables; "Hospitals" and "Num_of_Patients", so when you select 'USA' you will be working with two hospitals from USA and one single row for the Number of Patients.

Your script load the "Hospital" and "Num_of_Patients" tables and Qlik internally associated these tables on the "Country" Column.

You need to read more theory on how to handle scenarios when tables contains more than one common column, associating tables in these cases is as simple as aliasing the column within the load script.

Hope this helps, 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.