Filter to Last 12 Months (dynamic)

swagner Contributor

I've got two data sets I am trying to combine in Magic ETL to calculate inventory turns.  In the sales data I have 2 1/2 years of history that updates weekly.  In the ETL in preparing the sales data I need to filter to just the last 12 months (from last date in the set).  Since this last date updates each week I'd like to make this dynamic so each week when more data is availble this ETL moves forward so that the last 12 months (or 52 weeks) is represented in the data.


In the end my calculation is (Last 12 Months of Sales) / Current Inventory Value = Inventory Turns.


Any suggestions on how to take MAX Order Date - 12 Months?  

Best Answer