Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple If Then Statements in one

Status
Not open for further replies.

ramz003

Technical User
Apr 20, 2015
1
US
Hello.
I'm dealing with multiple if then statements that could be dealing with a subtraction between 2 negative numbers but it appears once it meets the first statement it skips the rest. Thanks for any help
Here is how the report is looking.

Variance Change Variance Prior
($6) $19 ($13) <-- should be ($19)
$100 $200 $300
($2487) $7461 ($4974) <-- should be negative


Here is the formula i'm using

if {@Variance} < 0 and {@Variance Prior} < 0
then
({@Variance Prior} * (-1)) - ({@Variance} * (-1)) *-1
else
if {@Variance} < 0 then
{@Variance Prior}- ({@Variance} * (-1))
else
if {@Variance Prior} < 0 then
{@Variance} - ({@Variance Prior} * (-1))
else
{@Variance} - {@Variance Prior}
 
Okay, apparently my earlier post didn't take.

abs({@Prior VAriance}) - abs({@Variance})
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top