Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

How to write condition by using mutiple columns to create one column in script

Hi Friends,

               I need help to create new column by using mutiple column conditions. Actually i have few columns like ID,

Comments, Withdrawn Description, Status and Withdrawn Reason. By using these columns i need to create new Column as Categroy. In Category columns we need to define three values i.e. Code, Lack, Reason.

I am giving conditions to create a New column Category by using below points.

1)Categorize as Code, if “Withdrawn” is not in the Comments and/or Withdrawn Description.

2)Categorize as Lack, if Null and/or N/A are in the Comments and Withdrawn Description

3) Categorize as Reason, if keyword match in the comments and/or withdrawn description does not align with Withdrawn reason

a) ID was submitted

“ID submitted in error”, ”Mistake”, ”Working Fine” or “Invalid”

b) Business Option

“business” , ”lower priority”, ”workaround”, ”accept”

c) Not reproducible

“Not repeatable”, “Efford”

 

Can any one help me on this how to write a condition.Thanks in Advance

1 Reply
Highlighted
Partner
Partner

Re: How to write condition by using mutiple columns to create one column in script

To be able to help you with that it's better to provide a concrete example. 

What I can say now, is that you break down the problem into several Flags in the loading script as follow

If(wildmatch([Description], "*Widthrawn*"), 'Withdrawn') As FlagWithdrawn

now using this flag in another resident load you create the other conditions, but personally I need concrete examples to be able to build the logic that generalizes over the cases you provide.

Thanks,

Mohamed