How are you calculating this today in existing applications? You will need to compare the max time/date of the value for the product id before the date time of the row in question in the inventory adj log. Doing this in Tableau directly with a join won't work because there is not a field to link on other than product id. I am thinking that if you had a way to create a log table of the changes for product cost log down to the smallest interval required (maybe every 15 min) in such a way that you have entries in a table for every 15 minute period of time or worse case to every minute with the lastest value/cost then this could be linked to from the primary table on time and product. id accurately. The size of the tables (this indicates more than 1 million rows) would seem to make this not a workable solution. How often is the date/time adjustment changing and can you be safe in rounding to some value in both tables so they could be matched?