Average formula on access

Alright. Just create a new database and import only the relevant objects into it. Delete the confidential data, enter some test data and upload that.
 
Here is the table. right now, it doesn't show the names, but i'm more concerned on how to to return the average.
 

Attachments

So what do I need to do to reproduce the problem?
 
Here try to use this one: what I want to do is when you select those dates, and the agent name, it will return me the average wrap for the span of those dates. For instance, when you choose Test as a name, and then choose dates from Dec 20- Dec 26, and it will return the average for those six days.
 

Attachments

Opening your database is not a problem. You uploaded a database with several forms, queries, tables, reports... etc. What I'm asking is, amongst these forms which one should I open? What tab should I click? etc.

Once you give me this info I will tell amend your db and upload it.
 
You will double click on Faculty file ---> you will open up the Faculty Details form ---> you will go to page 294 ---> and there you can select the Name on top and the dates.. once you click on span of dates, I want it to display the average wrap.

I have put this IIF Condition just now: =IIf(Int(DateDiff("d",[Date],[End Date]))>1,Sum([Average Wrap]),"Not working")

It won't display the average wrap, but all other condition work fine.
 
So chivo, since you've already filtered the results in the subform, why don't you just put Sum([Average Wrap]) in the Footer section?
 
Thanks for the reply back. So what does the footer does. I have watched the youtube video about it and I put that on footer, but nothing worked before. Let me give it a try on this sample database.
 
It's in the Footer you can get Sum working as expected. Bear in mind though, that because you have the form in Datasheet view, you will not see the result. It will calculate but you won't see it. Point another textbox to the Sum() textbox to see the value.
 
=IIf(Int(DateDiff("d",[Date],[End Date]))>1, sum([Average_wrap]),"Not working") Could i use this formula?
 
You're looking too much into your formula and not paying much attention to what is being advised. Let's ignore that formula for now and concentrating on getting the Sum to work first.

Re-read my post #27. Just put Sum([Average Wrap]) in the footer. Your subform is already filtered so it doesn't make sense to add any extra criteria. Plus your expression isn't logical for what you're trying to do.
 
Okay, but this will give me the subtotal though. What do I do next?
 
If you want the Grand Total you put another Sum() in the Report Footer.
 
Is there anyway I can be able to get the average? I have mentioned before that I want the average, not total sums.
 

Users who are viewing this thread

Back
Top Bottom