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

Calculate Qty depending on another field

Status
Not open for further replies.
Oct 12, 2005
204
0
0
GB
Hi,

OK so what I'm trying to do is do perform a calculation depending on the TRANSACTION CODE... so in the example below the OOREC transaction are parts produced and SUNREC are parts scrapped, so for ORDER_NO 12345 we need to add the OOREC with is 150 and subtract the SUNREC 25 which should give the result of 125.
Code:
TRANSACTION CODE  DATE        QTY   ORDER_NO   PART_NO
OOREC             13/08/2018  100   12345      M1234
OOREC             14/8/2018   50    12345      M1234
SUNREC            14/8/2018   25    12345      M1234
This is probably really simple to do but my brain has gone blank, so any help would be appreciated.

Regards,
Mick.
 
Create a Formula

@Total Qty

If {TransactionCode} = 'SUNREC' then {QTY}*-1 else else {QTY}

Yu might need to expand this if other codes affect qty differently

Replace QTY with this formula and then perform sum summary as usual

Ian
 

Perfect, thanks Ian appreciate your help.

Regards,
Mick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top