how to perform a calculation where two operations are needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have to perform to different operations on the same set of data based on a
criterion.
Here is my example:
Balance Amount TransactionType
500 25 1
350 300 2

If the TransactionType is 1 we should add the (balance+Amount) however if
the transactionType is 2 we need to subtract.
How do we achieve this?
 
Back
Top