expression builder Iif not recognising text

CJ81

New member
Local time
Today, 18:42
Joined
Jan 14, 2015
Messages
4
Can anyone tell me what's wrong with this iif statement?

=IIf([Details]="COST OF PRODUCT",[PerUnit]*[Quantity],0)

it keeps coming back with 0 even when the text says COST OF PRODUCT

I have also tried:
=IIf([Details]="COST OF PRODUCT*",[PerUnit]*[Quantity],0)
=IIf([Details] Like "COST OF PRODUCT",[PerUnit]*[Quantity],0) =IIf([Details] Like "COST OF PRODUCT*",[PerUnit]*[Quantity],0)

I'm using the expression builder to create it in a total box in the report footer, I have a box that gives me the total of the report using a sum and I need to show the cost of product separately to this as I need to use it in another calculation.

Thanks
Carrie
 
=Sum(IIf([Details]="COST OF PRODUCT",[PerUnit]*[Quantity],0))
 

Users who are viewing this thread

Back
Top Bottom