Finding minimum based on criteria of another field

M

Marcie

I have a report that is just doing calculations in the footer. The group is
based on a program.

Every footer counts, averages etc each program.

I can not seem to figure out how to do a min and max based on another field:
I have a calculation that counts part time and full time <35 = part time and
35 equals full time.
Now I want to find the minimum and maximum pay for the above.
Below is how I get the part time hours
CntHrsPT=Abs(Sum([Hrs]>1 And [Hrs]<35))
I also am trying to find the median for pay, both full and part time.
 
J

John Spencer

Try one of the following

MaxPayPT = Max(IIF([Hrs]>1 and [Hrs]<35,[CurrentPay],Null))

or alternative
MaxPayPT = Max(Abs(([Hrs]>1 and [Hrs]<35) * [CurrentPay]))

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Marcie said:
I have a report that is just doing calculations in the footer. The group
is
based on a program.

Every footer counts, averages etc each program.

I can not seem to figure out how to do a min and max based on another
field:
I have a calculation that counts part time and full time <35 = part time
and
35 equals full time.
Now I want to find the minimum and maximum pay for the above.
Below is how I get the part time hours
CntHrsPT=Abs(Sum([Hrs]>1 And [Hrs]<35))
I also am trying to find the median for pay, both full and part time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top