Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

ES3 - Calculation = neg number and want it to be 0 or greater

$
0
0

I have a 2 fields, one is an estimate and one is the actual cost. We are trying to calculate if there was an increase between the actual cost and the estimate. We estimate high so that our actual cost never goes above the estimate. Thus Actual - Estimate = negative number (meaning that the actual cost was not higher than the estimate). We have to show this number as either $0.00 (indicating that there was not an increase) or a higher dollar amount showing that the actual cost was higher than the estimate.

 

What I am trying to do when I subtract Actual - Estimate and it comes to a negative number, that it actually will only show up as $0.00 (if negative) or greater.

 

Then the second part is I have to show this "increase" as a percentage. So it would be Actual/Estimate.

 

 

Example

 

          Estimated: $350.00    Actual   $360.00

 

                

                   (360-350)           (360/350)

Difference:    $10.00      or       2.85%

 

 

 

          Estimated: $350.00    Actual: $275.00

 

Difference: $-75.00      or        0%

( I want this part to show $0.00      or     0% )

 

Thanks for your help!


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>