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 ?
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: