Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
gab_cerelli
Contributor II
Contributor II

If condition

Hi everyone,

I've a problem with a condition that I need to insert in a table already created.

I'll explain in practical terms, I've two values aggr (sum) in the table (we'll call them value X and Y) and I need to create a Z value like this:

If X<(0.5Y) then Z=Y+0.2Y ;

Can someone help me please?

Thank you

Labels (4)
1 Reply
jwjackso
Specialist III
Specialist III

If you can modify the load script, you can use a Preceding Load  statement

 

Data:

load *,

         If (x<.5Y,Y+0.2Y) as Z;

load Sum(X),

          Sum(Y)

From SomeTable;