Hello Alteryx Community 
Hoping I can get a little help on the below file comparison.
Background for reference:
1. Filling file will always have a date after the Position File.
2. Both files will always have different headers
Trying to create a formula or use a tool in Alteryx to compare the current Filling File with a historical Position File and update the current Filling File based on matching Station, Action and quantity.
Position File below

Filling File below

I am thinking Alteryx will need to go and find the position file 1 day before the date on the filling file, match the station and then based on the action and quantity make a decision.
So for example with Wawa the Filling File on the 15th is 20 which is 5 less than the Position File on the 14th therefore it is a trim. BP went from 0 to 5 which is a new purchase.
I was able to make a very long function in Excel but was hoping to add this to a flow in Alteryx that is connected to other parts of our business.
Thank you