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

i think Manish answered your question. Let us know if that does not fix your problem

Anonymous
Not applicable
Author

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

Not applicable
Author

Thanx for ur help, but here is the sample  data

 

LOBISSUECODE
XN
YN
ZN
CR

What I want is

If (LOB='Z' then change ISSUECODE ='R',ISSUECODE)

Not applicable
Author

Thanx for ur help, but here is the sample  data

 

LOBISSUECODE
XN
YN
ZN
CR

What I want is

If (LOB='Z' then change ISSUECODE ='R',ISSUECODE)

Not applicable
Author

Thanx for ur help, but here is the sample  data

 

LOBISSUECODE
XN
YN
ZN
CR

What I want is

If (LOB='Z' then change ISSUECODE ='R',ISSUECODE)

MK_QSL
MVP
MVP

If (LOB='Z','R',ISSUECODE) as ISSUECODE

Not applicable
Author

Still not working

here is the current Expression

iF(ISSUE0CODE_Combo='N' OR(  ISSUE0CODE_Combo='M' AND MANUAL_CODE_DISTRIBUTION='NB') ,'N',

iF(ISSUE0CODE_Combo='R' OR (  ISSUE0CODE_Combo='M' AND MANUAL_CODE_DISTRIBUTION='RB') OR ISSUE0CODE_Combo='PRF' ,'R',

If(LOB='PRF','R',NULL()))) AS IssueCode_Current,

sample data

LOB   ISSUECODE  ISSUECODE_COMBO

A               R

PRF           N                       PRF

sasiparupudi1
Master III
Master III

Hi

You can only achieve this sort of if condition if you manually iterate through the table records and it is not possible in the preceding loads. please see the attachement. Hope this helps.

Untitled.png

sasiparupudi1
Master III
Master III

Hi

Did you find your answer?

Sasi

kavita25
Partner - Specialist
Partner - Specialist

PFA

Hope it helps you.

Regards,

Kavita