Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Left Join Multiple Conditions

Hi Everyone,

I have two tables and need to make a left join to add a column from one table to another. The join needs to be made based on two conditions, which are that the Site Id and IP Country match each other in both tables. I've searched the form and cannot find a way to do this.

Table 1 (Conversions) includes the following:

Conversions:

LOAD [Site Id],

[Country IP],

[Conversion Rate]

FROM

[Conversion Test.xlsx]

(ooxml, embedded labels, table is [Informe 1]);

Table 2 (Subscriptions) to which I need to join [Conversion Rate] includes the following:

Subscriptions:

LOAD [IP Country],

[Billing Country],

Language,

Currency,

Day,

Month,

Hour,

Week,

[Site ID]

FROM

[Subscription Data.xlsx]

(ooxml, embedded labels, table is Sheet1);

I need to join [Conversion Rate] to the subscriptions table where [Country IP] is equal to [IP Country] and [Site Id] is equal to [Site ID]. Any insight into how to do this will be greatly appreciated. I've attached an example as well.

Best,

Matt

1 Solution

Accepted Solutions
michael_anthony
Creator II
Creator II

Hi Matt,

The Left Join will automatically join based on any and all common field names b/w the two tables.

For your example, in Subscriptions change your load to be:

LEFT JOIN (Conversions) LOAD

[IP Country] as [County IP],

  [Site ID] as [Site Id],

:,

:,

FROM Subs....

That will join the two tables.

View solution in original post

2 Replies
michael_anthony
Creator II
Creator II

Hi Matt,

The Left Join will automatically join based on any and all common field names b/w the two tables.

For your example, in Subscriptions change your load to be:

LEFT JOIN (Conversions) LOAD

[IP Country] as [County IP],

  [Site ID] as [Site Id],

:,

:,

FROM Subs....

That will join the two tables.

Not applicable
Author

Worked perfectly, thanks a lot Michael!