wrap expression in an extra IIf

qwertyjjj

Registered User.
Local time
Today, 00:49
Joined
Aug 8, 2006
Messages
262
I have the following expression, which needs to be wrapped by some extra logic:
IIf([NetTotal]<>0,IIf([NetTotal]-[InvoicesRaised]>0,30,[InvoicesRaised]/[NetTotal]*30),0)

What I need to do is, if the above expression comes to less than 0, then the control box needs to display 0, otherwise it should display the value of the expression.

Now, I know I can do this by IIf(expression<0, 0, expression). However, this adds a lot of code in there and the expression is put in twice. Is there an alternative way of doing this ?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom