[tt]
if @ExtP .is greater than. 0
then
perform the calculation
else[red]
@ExtP IS ZERO -- cannot use in denominator!!![/red]
perform some other calculation that does not divide by @ExtP
[/tt]
HOWEVER, this seems to me like a screwy formula to begin with. It seems UP SIDE DOWN!
You are taking the difference between a total cost and ExtP (not sure but is this Extended Price or some value that eventually becomes equal to total cost???) and dividing by a value that begins at ZERO and increases to..... what? total cost?
Making the assumption as just stated, I'd see as much more reaonable, the formula to be...
[tt]
({@ExtP}/{@Tot Cost})*100
[/tt]
and if you want the inverse of that then the formula would be...
[tt]
(1 - ({@ExtP}/{@Tot Cost}))*100
[/tt]
Skip, Just traded in my old subtlety...
for a NUANCE!
Your assumptions are correct. I'm working out the margin % between Extended Price and Extended Cost on a sales table.
Sometimes the cost or the price may be zero and hense the error I was receiving.
the formula for margin % being (price-cost)/price*100
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.