×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Calculate Qty depending on another field

Calculate Qty depending on another field

Calculate Qty depending on another field

(OP)
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.

RE: Calculate Qty depending on another field

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

RE: Calculate Qty depending on another field

(OP)

Perfect, thanks Ian appreciate your help.

Regards,
Mick.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close