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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seperate and sum the negative amounts 1

Status
Not open for further replies.
Jan 21, 2002
112
GB
I have a @totalcost formula that simply multiplies
QTY against Cost in a daily report of cost adjustments.

As some QTY are adjusted down there are some negative costs i.e £-20.05 as well as some positve (£20.00)

I wish to simply sum the negative costs in the footer seperately from the positive but every formula I write just gives me a zero amount.

My Total formula for each transaction is:

@TotalCost

{Transaction_History.COST_15}*Transaction_History.TNXQTY_15}

I can write a formula to sum all totalcosts but not one that seperates the minus totals from the postive totals.

I hope that makes some sense - any pointers with the formula would be greatly appreciated.

Many thanks
 
Try:

if {@TotalCost} < 0 then {@TotalCost} //negatives formula

if {@totalCost} >= 0 then {@TotalCost} //positives formula

Insert summaries on each of these formulas.

-LB
 
Many Thanks lbass

I was close but somehow not quite there.

Your time and patience most appreciated

Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top