If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Using operators in If then Else statement for Absolute Values

Started by ccbarbeau, 25 Jul 2013 09:35:07 AM

Previous topic - Next topic

ccbarbeau

Good morning,

I have a table (DB2) which contains inventory transactions in absolute values. A 2nd column shows me with a S or an A whether it is a add or subtract transaction. I need to calculate the sum of the transactions for a given date/user. I was thinking of using an if then else but I'm not sure how to go about it.

Any suggestions?

Thanks!

wyconian

Hi

I'd suggest you need a column to decide what sign the values have, something like
IF (2nd Column = 'S')
THEN (Value *-1)
ELSE (Value)

Then you can do your totaling on this column.

Hope that helps