year Admits Dcstatus
2008 16 Dead
2008 8 Alive
2008 17 Dead
2008 5 Alive
2008 31 Dead
2008 5 Alive
2008 22 Dead
2008 9 Alive
Sorry yes it is an unbound control that I am using and thank you for your
help. When I plug in your formula the answer I get is 8 which is the first
number in the column. I wonder if it is not adding all of the admits? I
believe the correct answer in this example would be 27 admits were discharged
alive. Once again thank you for your time , it is very much appreciated.
Deb
fredg said:
On Sat, 7 Mar 2009 09:20:01 -0800, ferde wrote:
I have a bound control in my report footer that I would like to use a formula
to determine the number of admits who were discharged alive.
year Admits DishchargeStatus
2009 200 alive
2009 20 dead
2008 150 alive
2008 50 dead
Answer: Total number of Admits discharged alive = 350
Here is what I have tried: =Abs(count([DischargeStatus])="alive" and
[Admits]))
I hope you mean you have an UNBOUND control in the report footer in
which you would like to display how many Admits left the hospital
alive. No need for the ABS() function.
=Sum(IIf([DischargeStatus] = "Alive',[Admits],0))
Always include a copy of your exact control source expression.
I notice now that I inadvertently used a single quote instead of a
double quote in the expression , i.e. "Alive' instead of "Alive".
It should be:
=Sum(IIf([DischargeStatus] = "Alive",[Admits],0))
That expression works for me, placed in the report footer (not the
page footer).