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: 
Not applicable

If Statement Issue

I am trying to use an If Statement which should change the Value of another field. For Example

If(Field1='A', Field2='X',Field2) as New_Field.

How can I accomplish this

19 Replies
Anonymous
Not applicable
Author

Hi,

if I undestand right:

If(Field1='A', 'X',Field2) as New_Field.

Regards.

MK_QSL
MVP
MVP

IF(Field1 = 'A' and Field2 = 'X', Field2) as NewField

Not applicable
Author

No what I had was right , I want Field2 Value to be dependent on Field1.

For Example

If(Category='Tennis',  then Activity='Sports' else Activity)


Not applicable
Author

No what I had was right , I want Field2 Value to be dependent on Field1.

For Example

If(Category='Tennis',  then Activity='Sports' else Activity)

Anonymous
Not applicable
Author

Excuse me but I dont understand.

Is this?

If(Field1='Tennis', ' Sports' , Field2) as Field2

Or Field2 is a new field?

So is:

If(Field1='Tennis', ' Sports' , 'Other') as Field2

daniel_kusiak
Creator II
Creator II

If(Category='Tennis',  then Activity='Sports' else Activity)


IF(Field1 = 'A',Field2,Field2) as NewField

Anonymous
Not applicable
Author

If(Field1='A' and  Field2='X',Field2, null()) as New_Field.

MK_QSL
MVP
MVP

If(Field1='A', 'X', Field2) as New_Field


If(Category = 'Tennis', 'Sports', Activity) as FieldName

Anonymous
Not applicable
Author

if you still have an issue post us sample data in excel sheet