SUM IIF on multiple fields

  • Thread starter Thread starter stevefell
  • Start date Start date
S

stevefell

Guest
I would like a sum iif statement which returns '1' if two conditions are true.

i.e.

=SUM IIF([period])=1,1,0) + IIF([leavID])=3,1,0))

if period =1 and leavID=3 then the text box value =1

Is this possible either using a text box on a report or calculated field in a query?

Thanks

Steve
 
Just wondering why you want a sumif statement. From whatyou have said it looks like you are wanting a normal Iif statment that returns 1 if both items are true otherwise 0.

Iif([period]=1 AND [leavID]=3,1,0)

HTH
 

Users who are viewing this thread

Back
Top Bottom