Calculation ????

danbl

Registered User.
Local time
Today, 08:50
Joined
Mar 27, 2006
Messages
262
:confused:

On my report I want to count the number of records with have a temp valule greater than 96.8 degrees. Below is the formula, but it returns the total count of the records and does not omitt the records where the temp is less than 96.8. It also makes no difference if I use " " around the temp value.

=IIf([Q2]>96.8,Count([Q2]),0)

This is probably simple but I just am not seeing it.
Can anyone tell me what the problem is???

Thanks
 
You should look up a running sum.

You can do a count like that using a textbox whose default value is something like

=IIf([Q2]>96.8,1,0)
and set the running sum property to yes

Then at the bottom of the report you will want to have anothertextbox whose control source is set to [yourtextboxname] from the above section
 
Thanks Ray, I did as you suggested entered the formula, set the running sum to "Over All" (choices are No, Over Group, Over All) and it only gives me a total of 1 rather than 52 which is what I should see for the range I am using for the date range. Any thought as to why???:confused:
 
Personally I would do the count in the query the report is based on, using rainman's formula.

Brian
 
So you are saying that there are 52 occurrences where q2 is over 96.8?

Are you putting the total textbox in the pagefooter section of the report?
 
Personally I would do the count in the query the report is based on, using rainman's formula.

Brian

Instead of a running sum? Can I ask why you prefer that way? Is it faster/etc??
 
I always have problems with calculations in reports, just like your poster, I believe I have read that it is faster.
Of course you are sometimes fotced to do the calculations in the report and it should work.

Brian
 
I was going to suggest to Dan that he set his running sum text box to visible = no and place the total textbox in the Report footer, but I see he has gone.

He should ignore my kneejerk comments as a running sum is so simple.

brian
 
I was going to suggest to Dan that he set his running sum text box to visible = no and place the total textbox in the Report footer, but I see he has gone.

He should ignore my kneejerk comments as a running sum is so simple.

brian


Yeah im wondering if he keeps seeing the one, but if his running sum is on he should see it increment. Who knows. Thats for the info on the running sum being slower though. I didn;t know that
 
Yeah im wondering if he keeps seeing the one, but if his running sum is on he should see it increment. Who knows. Thats for the info on the running sum being slower though. I didn;t know that

I'm not swearing to it, it's just something in the back of my mind from years ago, if it matters ask an expert.

brian
 
Brian,

I did as you suggested and it worked great. Thanks for the help!!

Dan
 

Users who are viewing this thread

Back
Top Bottom