IF ELSE SUM in report (1 Viewer)

naks

New member
Local time
Today, 13:37
Joined
May 6, 2013
Messages
3
Hi.
I Am new here. can anyone help me out ?

I have debit & credit column. Which I use this in the report --> =IIf([PaymentMet_trans]=2,"",[Amount])
debit = 1 , credit = 2

Now, i would like to have the total sum of it. according to the debit & credit separately instead of the whole total sum.

i did this : =Sum(IIf([PaymentMet_trans]=2,0,[Amount]))

error pop up : this expression is typed incorrectly or is too complex etc etc ...

anyone :confused::confused:
 

billmeye

Access Aficionado
Local time
Today, 16:37
Joined
Feb 20, 2010
Messages
542
You may have a null value preventing the math. Try adding Nz:

=Sum(IIf(Nz([PaymentMet_trans],0)=2,0,Nz([Amount],0)))

I added it to both of your fields just in case either could be null and defaulted your PaymentMent_trans to 0 since a null should result in no payment for that type.
 

Users who are viewing this thread

Top Bottom