Jeffreyb723
Registered User.
- Local time
- Today, 18:54
- Joined
- Nov 20, 2013
- Messages
- 10
I have a table with Sales Dates and Sales Price and I am using a Running Total Query to chart our Monthly Sales by Day.
I've placed the chart on a form and linked it with a Combo Box for Month and text box for year to view each Month individually.
My boss wants me to add a target line to this chart.
So I added a Table (tblMonthlyTargets) with TargetMonth, TargetYear, and TargetTotal fields
I was thinking of doing a separate Running Total Query using tblMonthlyTargets, my Month Combo Box and Year text box from the form. Each working day for the month would add to the total target for that month until we get the target we want i.e. There is 19 working days in December and our goal is $143k so our Targets would be December 2nd $7526, December 3rd $15,053...December 30th $143,000.
1. Is doing the calculation at runtime based on the forms controls an acceptable idea? (I'm more worried about space at this point than performance)
2. How would I add the running total as a separate line to the chart? (I just thought about having a Yes/No Column in a Union Query for the Combined Running Totals Flagging Yes for Sales and No for Target but haven't tried it yet so I don't even know how I could use that to separate them on the chart)
Any Ideas would be appreciated, thanks
I've placed the chart on a form and linked it with a Combo Box for Month and text box for year to view each Month individually.
My boss wants me to add a target line to this chart.
So I added a Table (tblMonthlyTargets) with TargetMonth, TargetYear, and TargetTotal fields
I was thinking of doing a separate Running Total Query using tblMonthlyTargets, my Month Combo Box and Year text box from the form. Each working day for the month would add to the total target for that month until we get the target we want i.e. There is 19 working days in December and our goal is $143k so our Targets would be December 2nd $7526, December 3rd $15,053...December 30th $143,000.
1. Is doing the calculation at runtime based on the forms controls an acceptable idea? (I'm more worried about space at this point than performance)
2. How would I add the running total as a separate line to the chart? (I just thought about having a Yes/No Column in a Union Query for the Combined Running Totals Flagging Yes for Sales and No for Target but haven't tried it yet so I don't even know how I could use that to separate them on the chart)
Any Ideas would be appreciated, thanks