Jump to content
Salesforce and other SMB Solutions are coming soon. ×

calculation--limited to last 7 records


menashe123
 Share

Recommended Posts

What calculation is needed to get the average of a number field, restricted to the last seven records of a database? I am a diabetic and I record blood glucose readings daily, and it would help me to know the average reading of last seven days.

 

Each page contains seven records, one for each day of the week. At the end of each week, I like to see what the average reading (number field) of my blood glucose. I already have an average field that calculates all records. The new field would show average of only the last seven days.

Link to comment
Share on other sites

Create a new calculated field with this value:

 

If (GluTestDate >/= Get(CurrentDate)-7;GluTestNum;"")

 

 

Then one more field: a summary field giving the "Average" of the above field.

 

 

Edit: ">/=" is greater than or equal to.

Link to comment
Share on other sites

Cool solution.

 

Be sure to set the storage on that field to "unstored — calculate as needed", though, or it won't work, since it references Get(CurrentDate)

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use