Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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;