Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Left join not operating correctly, appears to be working as an inner join

somaxr
New Member

I have some finance data, some of which is actuals from the past until now (as a running total of small transactions) and the other data is budget data which runs from now until the future.

These data sets have 2 items in common, the month in which they relate to needs to be the same, and so does the nominal accounting code. They are both fact tables so do not have a natural primary key, but we have created concatenated primary keys for each. We are trying to join them via the use of a calendar table (which has dates from the past running well into the future, date is the primary key on this table) and a reference table for the nominal codes (the nominal code is primary key on this table).

we have created the following explore to join these together:

image

Calendar is used as the base table, and a left outer join is used to join the calendar dates to the other tables. However, when we visualise the data, it is limited by the date fields on the budget view, and will not let us see past data on the transactions view. As the calendar table runs into the past, and it is a left outer join, why is this data being limited to the date fields in the budget table as if it were an inner join?

(note: we have tried various combinations of the many:many, many:one etc just in case we had got this wrong, and have commented out the ‘max_date’ view to ensure this wasn’t causing the issue).

0 3 4,253
3 REPLIES 3
Top Labels in this Space