65 pts.
 Determining data from a certain date range
I have an Access 2003 database that has weekly dates and weights enter for a weight loss program. Ech program session is 8 weeks and people sign up for anywhere from 1 to many more sessions at a time. I want to find out the average weight lost in the first 8 weeks that a patient belongs, then in 16 weeks and so on. However, not every patient has every week entered and all pateints start on different weeks (but the weigh ins are always Wednesdays. Is there a way to pull the dates and weights from everyones first session, second session, and so on? I have tried doing [initial date] + 56, dateadd [ww, 8, initialdate] and CountofDate but none have pulled more than 25% of the patients.

Software/Hardware used:
Microsoft Access 2003
ASKED: July 30, 2012  12:40 PM
  Help
 Approved Answer - Chosen by HSwartzPartners (Question Asker)

program: Int(DateDiff('ww',[start_date],[session_date])/8)+1

ANSWERED:  Jul 30, 2012  2:47 PM (GMT)  by HSwartzPartners

 
Other Answers:
Last Wiki Answer Submitted:  July 30, 2012  12:40 pm  by  HSwartzPartners   65 pts.
Latest Answer Wiki Contributors: 
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

you will have to generate a “driving file” to use in a left outer join.  This file would consist of every patient and every Wednesday from their start date to current.  Their data is attached where it matches.  Then you can count off the weeks for your sessions, and do your averages, etc.

 7,185 pts.

 

thank you very much I will try that!!

 65 pts.

 

<p>You don’t need initial date.  Ignore it for purposes of your calculations.  Instead, tally only their weekly weights.</p><p>This may be a case where you have a lot of available data and you want to make use of it.  Yes, the initial date has value elsewhere – and should be used there – but for your statistics, that data is not required.</p><p>Every person starts at week 0 with their initial weigh-in.  Their next weigh-ins are recorded after this and if no weigh-in happens, enter the same weight as last week.  If they weigh in the following week, use an average for the week between.  If they miss more than one weigh-in, use the higher of the recorded ends for the intervening weeks.  ALWAYS indicate interpolated weigh-ins.</p>

 1,590 pts.

 

@BigKat
I tried doing that and got a column in my query thats says Expr1 (representing the formula you gave me) but am not positive what it means…what is the +1 for?  Also now that I have a count of the weeks that everyone stayed for, how to do I get the weight of every person on their 8th week for example.  When i write in criteria “=8″ it only comes up with patients whose total time in the program was 8 weeks as opposed to every patient’s 8th week regardless of the length of their membership?  I appreciate any advice or help you can give!!

 65 pts.

 

also the number of patients from the past 3 years is 211 but my query has 764 records ( it is showing many duplicates) even with MaxofDate and LastofWEight in the Totals Query.

 65 pts.