Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trying to build a If Statement


I am trying to build a if statement from 2 fields in the same table and load back to the table so I can use in reports I am creating

if([Claim_Type]='Lost Time',if([Claim_Status]='Open',1,0))as LT Open

6 Replies
swuehl
MVP
MVP

what issues do you see? Could you post some sample data lines of that table and your requested result?

sunny_talwar

Whatis the logic you are trying to follow here?? May be this:

If you are trying to flag LT Open with 1 when both Claim Type is Lost Time and Claim Status is Open

if([Claim_Type]='Lost Time' and [Claim_Status]='Open',1,0) as LT Open


or

If you are trying to flag LT Open with 1 when both Claim Type is Lost Time or Claim Status is Open

if([Claim_Type]='Lost Time' or[Claim_Status]='Open',1,0) as LT Open

sasiparupudi1
Master III
Master III

if([Claim_Type]='Lost Time' and [Claim_Status]='Open',1,0) as LT Open

qlikviewwizard
Master II
Master II

Hi Use this:

if(([Claim_Type]='Lost Time' and [Claim_Status]='Open'),1,0) as [LT Open],

Capture.JPG

Anonymous
Not applicable
Author

Thanks Look like that worked

Tom

qlikviewwizard
Master II
Master II

Hi Tom,

Please close the thread by selecting Correct Answer,Helpful answers and Close the thread. Thank you