Link to home
Start Free TrialLog in
Avatar of Mark01
Mark01Flag for United States of America

asked on

Quantity and Date Range Calculations

I am working on a formula that calculates how many milligrams of aspirin a patient consumes daily. A patient consumes 1 or more mg of aspirin daily. A blood test determines the concentration of aspirin in the patient. The test results are always fluctuating.

Here is some sample data:
Week 1: Patient takes 1 mg of aspirin per day. The date range is January 1, 2018 to January 7, 2018.
Calculation: 7 divided by 1 = 7 mg in 7 day period. Result is 1 mg per day.

Database fields (Access):
{Test_Date.TestDate} = Need 7 days.
{Aspirin_Dosage.Dosage} = Need to add daily dose in mg for 7 days.

Screenshots of the database tables are shown below. How do I write a formula that performs the calculations?
User generated image
Avatar of Raghavendra Hullur
Raghavendra Hullur
Flag of India image

Hi,

Do you have the report already designed?
If yes, do you have a group for consolidating data week-wise?

Ho do you intend to calculate the date range of 7 days from TestDate database field?
Avatar of Mark01

ASKER

Yes. I am testing the attached report. I haven't used any groups yet. I don't know how to write the formula to perform the calculation. Please help me write the formula.
Daily_Dosage.rpt
ASKER CERTIFIED SOLUTION
Avatar of Raghavendra Hullur
Raghavendra Hullur
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark01

ASKER

It worked. Yes, the dosage will be different on many different days. I just used sample data for the question.
Avatar of Mark01

ASKER

Thank you, Raghavendra.