Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database design - actual vs budget model

Posted on 2002-04-12
5
Medium Priority
?
716 Views
Last Modified: 2011-10-03
I want to put together a database to produce actual vs budget comparisons and would like some direction in how best to set up the structure.  The output will be weekly variance reports by account number for each department as well as for the total company.

The 52 weeks of the calendar year are subtotaled into months in a 5-4-4 pattern.  For example Jan consists of the first 5 weeks of the year, Feb the next 4, Mar the next 4, Apr the next 5 and so on.  Due to this 'fiscal month' setup I am unsure how to structure the tables so that I can easily construct reports for weekly, month-to-date, quarter-to-date, and year-to-date accumulations and comparisons.  

Any advice is greatly appreciated.  
0
Comment
Question by:clballas
  • 2
  • 2
5 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 400 total points
ID: 6936560
clballas,

  The way to structure the tables is to simply include a date/time field along with the posting.

  There are a multitude of date/time functions that you can use to extract a month, week #, year, etc.

Jim.
0
 
LVL 58
ID: 6936568
Note the only other thing you'll need is a "Fiscal calendar" table with the last day of each month and the period it's considered to be.  This will serve as a lookup table to determine the fiscal period for a given date.

Jim.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6936888
Hi,

Some general remarks:
1) To be able to have both week and month reports, your data needs to be recorded on a daily basis. (A week can fall in two months!)
2) Weeknumbering differs depending on the algoritm for the first week. In the US this is in general different from Europe. Personally I created my own weeknumber function, as the first of january can give a week 53 of the previous year....
3) All groupings can be done using the access functions like FORMAT and/or MONTH

Nic;o)
0
 

Author Comment

by:clballas
ID: 6938735
Thanks Jim and Nico for your suggestions.  I am awarding these points to Jim because his was the first reply and I will also post a question for Nico because those comments are also helpful.  So reply to that posting and I will award those points to you Nico.  I am interested in how the week number function that you created is different from the one in Access.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6938858
Hi clballas,

I change the year when the week returned is larger as 5 and the month is january.
When you start the year with the first week having atleast 3 days, then it's possible for 1-1-2001 to endup for week 53 however when you combine this with the year function on the date, you'll end up with a week 53 for 2001 having data of the first of january.
As I always combine Year and week to prevent a weekmix over years...

Just check:
Debug.Print Format(#1/1/2000#, "YYYY-WW", vbMonday, vbFirstFourDays)

Nic;o)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question