Issues Joining Transaction Details to Primary Dataset


I have two datasets. One is structured as the "primary" expense file, where each row is dates and other dimensions for each credit/debit. The next is credit card transaction details.

They share transaction IDs in a column named Doc, share GL #'s, and share posted dates. The combination of all 3 of these things will result in a unique join. My issue is this: there are other values besides transaction IDs in the Doc column in the expense file. Below is what I mean:

The orange underline are the other expenses in the source file that are not credit card transactions. But the transaction IDs are in that same column. This is my issue. How can I properly join on transaction ID so that the output of the ETL below is the entire expense file but with CC transaction details?

I tried seperating the process of the join and then appending to the expense file but that hasn't worked properly. Below is my current ETL, I am happy to elaborate on any particular part:

Best Answers