G
Guest
I am trying to create a report based on a flat file to show the cumulative
sales by day of the week. The problem I am now having is that I cannot get
some of my subtotals to calculate correctly.
The table I am using contains the total daily sales quantities for each
product, together with the corresponding product details. I have then
created a simple query on this to produce the following fields. These are
listed with samples of the data contained:
Weekday (to identify the day number) eg. 1, 2, 3
Day, eg. Sun, Mon, Tue
WeekNo, eg. 31, 32, 33
DepartmentCode, eg, 94, 95, 96
DepartmentDesc, eg. Homewares, Ambient, Grocery
SectionCode, eg. 41, 42, 43
SectionDesc, eg. Cookware, Tinned, Fresh produce
SubsectionCode, eg. 02, 03, 04
SubsectionDesc, eg. Pans, Baked beans, Tomatoes
BuyerName, eg. James Richardson, Tim Reynolds, Bob Taylor
ProductCode, eg. 415745, 254471, 958764
ProductDesc, eg, Stainless steel 24cm, Heinz 450g, Spanish pack of 6
SalesQuantity, eg, 4, 258, 65
SalesValue, eg. 30.66, 64.50, 45.50
Next, I based a report on this query and grouped it in order of WeekNo,
BuyerName, DepartmentCode, SectionCode, SubsectionCode and ProductCode.
In the ProductCode footer, I created a text box to show the total sales for
day 1 (Sunday) through to Saturday by using variants of the following formula:
=IIf([Weekday]=1,[SalesQuantity],0)
To the right of these, I created two boxes with the following criteria to
show the total sales values for the week:
=Sum([SalesQuantity])
=Sum([SalesValue])
These 9 fields were then copied into two footers I had created for the
SubsectionCode and SectionCode. I am now left with the weekly totals that
appear to be correct, whilst the daily totals are incorrect.
I think the problem here lies with the fact that I need to somehow summarise
the data by week, but also retain the ‘day’ information in order to produce
the daily totals. Unfortunately, my experience with Access is insufficient
to know whether this is in any way possible.
Any assistance offered will be much appreciated.
Thanks in advance.
sales by day of the week. The problem I am now having is that I cannot get
some of my subtotals to calculate correctly.
The table I am using contains the total daily sales quantities for each
product, together with the corresponding product details. I have then
created a simple query on this to produce the following fields. These are
listed with samples of the data contained:
Weekday (to identify the day number) eg. 1, 2, 3
Day, eg. Sun, Mon, Tue
WeekNo, eg. 31, 32, 33
DepartmentCode, eg, 94, 95, 96
DepartmentDesc, eg. Homewares, Ambient, Grocery
SectionCode, eg. 41, 42, 43
SectionDesc, eg. Cookware, Tinned, Fresh produce
SubsectionCode, eg. 02, 03, 04
SubsectionDesc, eg. Pans, Baked beans, Tomatoes
BuyerName, eg. James Richardson, Tim Reynolds, Bob Taylor
ProductCode, eg. 415745, 254471, 958764
ProductDesc, eg, Stainless steel 24cm, Heinz 450g, Spanish pack of 6
SalesQuantity, eg, 4, 258, 65
SalesValue, eg. 30.66, 64.50, 45.50
Next, I based a report on this query and grouped it in order of WeekNo,
BuyerName, DepartmentCode, SectionCode, SubsectionCode and ProductCode.
In the ProductCode footer, I created a text box to show the total sales for
day 1 (Sunday) through to Saturday by using variants of the following formula:
=IIf([Weekday]=1,[SalesQuantity],0)
To the right of these, I created two boxes with the following criteria to
show the total sales values for the week:
=Sum([SalesQuantity])
=Sum([SalesValue])
These 9 fields were then copied into two footers I had created for the
SubsectionCode and SectionCode. I am now left with the weekly totals that
appear to be correct, whilst the daily totals are incorrect.
I think the problem here lies with the fact that I need to somehow summarise
the data by week, but also retain the ‘day’ information in order to produce
the daily totals. Unfortunately, my experience with Access is insufficient
to know whether this is in any way possible.
Any assistance offered will be much appreciated.
Thanks in advance.