F
freddyjo
Guest
Hi.
Hope someone can help me with this problem. I have just started using access and I definitely need help.
Problem:
I have a table with sales history for different products.
The table is pretty large and contains sales history from 2002 to YTD.
There are thousands of different products.
I want to make a VBA procedure that calculate the mean and standard deviation for sales per item per week over a given period of time.
I have the following fields: [Itemno],[SalesDate] and [SalesQty].
A part of the problem is that one item may only have e.g. 3 sales withdrawals per year and the table only contains the withdrawals:
Itemno SalesDate SalesQty
02024 Week 2 100
02024 Week 16 70
02024 Week 43 200
Ideally I would like to use SalesQty = 0 in the weeks with no sales in the calculation:
Itemno SalesDate SalesQty
02024 Week 1 0
02024 Week 2 100
02024 Week 3 0
02024 Week 4 0
02024 Week 5 0
.
.
.
02024 Week 16 70
.
.
02024 Week 43 200
.
.
02024 Week 52 0
Ideally the program or procedure may return the result in a new table.
Anyone understand what I mean?
Is this achievable in Access?
Regards,
freddyjo
Hope someone can help me with this problem. I have just started using access and I definitely need help.

Problem:
I have a table with sales history for different products.
The table is pretty large and contains sales history from 2002 to YTD.
There are thousands of different products.
I want to make a VBA procedure that calculate the mean and standard deviation for sales per item per week over a given period of time.
I have the following fields: [Itemno],[SalesDate] and [SalesQty].
A part of the problem is that one item may only have e.g. 3 sales withdrawals per year and the table only contains the withdrawals:
Itemno SalesDate SalesQty
02024 Week 2 100
02024 Week 16 70
02024 Week 43 200
Ideally I would like to use SalesQty = 0 in the weeks with no sales in the calculation:
Itemno SalesDate SalesQty
02024 Week 1 0
02024 Week 2 100
02024 Week 3 0
02024 Week 4 0
02024 Week 5 0
.
.
.
02024 Week 16 70
.
.
02024 Week 43 200
.
.
02024 Week 52 0
Ideally the program or procedure may return the result in a new table.
Anyone understand what I mean?
Is this achievable in Access?
Regards,
freddyjo