Page 1 of 1

DerivationStatement

Posted: Tue Aug 14, 2007 11:03 am
by scorpion
Hi,

I have 2 source fields:

AAA,
BBB

my target field name is:

XXX

The logic to populate XXX target column like below:

if AAA = 255 ( BBB<0 THEN populate XXX= LOSS,but IF BBB >0 then populate XXX=PROFIT)

Else other than AAA=255 VALUES leave it blank.


Can any one help me to apply this in IF-THEN-ELSE statements.

Re: DerivationStatement

Posted: Tue Aug 14, 2007 1:19 pm
by meena
If (AAA = 255 & BBB<0) Then 'LOSS' Else If (AAA = 255 & BBB >0) then 'PROFIT' Else ' '
AAA,
BBB

my target field name is:

XXX

The logic to populate XXX target column like below:

if AAA = 255 ( BBB<0 THEN populate XXX= LOSS,but IF BBB >0 then populate XXX=PROFIT)

Else other than AAA=255 VALUES leave it blank.

Posted: Tue Aug 14, 2007 6:46 pm
by ray.wurlod

Code: Select all

If AAA = 255 Then If BBB > 0 Then "PROFIT" Else If BBB < 0 Then "LOSS" Else "" Else ""
may be slightly more efficient

Posted: Wed Aug 15, 2007 2:55 am
by scorpion
Thanks Ray...