what I want to do is compare the average monthly sales over the last 12 months with this months sales. The original table has the following fields: ID, StartDate, QBSales among others. The query where I am comparing data sorta looks like this: StartDate QBSales ThisMonth
1/1/1994 9,005.00 23928
2/1/1994 8,521.00 23929
3/1/1994 9,743.00 23930
I would like to add a column where it shows the average sales for the 12 months leading up to the month in the record. So in my example there would be an additional column as follows:
StartDate QBSales ThisMonth 12MoRollAvg
1/1/1994 9,005.00 23928 (avg of QBSales for months 23917-23928)
2/1/1994 8,521.00 23929 (avg of QBSales for months 23918-23929)
3/1/1994 9,743.00 23930 (avg of QBSales for months 23919-23930)
any help would be appreciated.
1/1/1994 9,005.00 23928
2/1/1994 8,521.00 23929
3/1/1994 9,743.00 23930
I would like to add a column where it shows the average sales for the 12 months leading up to the month in the record. So in my example there would be an additional column as follows:
StartDate QBSales ThisMonth 12MoRollAvg
1/1/1994 9,005.00 23928 (avg of QBSales for months 23917-23928)
2/1/1994 8,521.00 23929 (avg of QBSales for months 23918-23929)
3/1/1994 9,743.00 23930 (avg of QBSales for months 23919-23930)
any help would be appreciated.