I would like to create some custom columns of data within my query.
I would like to create the following column: Last4WeeksQty. It would be something like
Last4WksQty: IIf(([dbo_Depot_Buckets.Date_Start]) Between (([dbo_Depot_Buckets.Date_Start])-21) And ([dbo_Depot_Buckets.Date_Start]),([Qty_Sold]),0))
The above formula retuns a number but it is not summing correctly, it is just returning the qty of that week....
Current query shows:
Year DateStart Week SKU Qty Dlrs 2012 03-26-2012 9 315554 10 45 2012 03-19-2012 8 55456 15 66 2012 03-12-2012 7 654496 154 545 2012 03-05-2012 6 465465 654 654 2012 02-27-2012 5 56684 544 441