
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Worked perfectly, thanks a lot Michael!
