calculating using the IIF statement

G

Guest

I have a database that tracks order processing. I have created a report to
show orders in process, orders completed, etc.
In the footer of the report I want to calculate the number of orders
completed on a particular shift.

Example: To count the cubes completed during the day I have the formula
sum(iif([pick end])<>0,[cubes],0))

This works well for summing the total cubes that are completed.

I need to add another criteria to this sum to calculate the totals for a
shift.

I have 2 shifts: 1ST and 2ND. I want to sum [cubes] if [pick end]<>0 AND
[pick shift] = "1ST.
 
D

David Lloyd

IIF([pick end]<>0 AND [pick shift] = "1ST",[cubes],0)

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I have a database that tracks order processing. I have created a report to
show orders in process, orders completed, etc.
In the footer of the report I want to calculate the number of orders
completed on a particular shift.

Example: To count the cubes completed during the day I have the formula
sum(iif([pick end])<>0,[cubes],0))

This works well for summing the total cubes that are completed.

I need to add another criteria to this sum to calculate the totals for a
shift.

I have 2 shifts: 1ST and 2ND. I want to sum [cubes] if [pick end]<>0 AND
[pick shift] = "1ST.
 

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