Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a Field off of two conditions

Hi I was wondering if it is possible to create  a Field where the user can choose out of two options using these statements

IF(WildMatch(MsgCategories,'BILLABLE','*;BILLABLE','BILLABLE;*'),'Billable')

IF(WildMatch(MsgCategories,'*NONBILLABLE*'),'NonBillable')

1 Solution

Accepted Solutions
Not applicable
Author

In Script level try this,

Load

       IF(Wildmatch(MsgCategories,'BILLABLE','*;BILLABLE','BILLABLE;*'),'Billable',

         if(WildMatch(MsgCategories,'*NONBILLABLE*'),'NonBillable')) as Flag


Your flag field consist of two field value  Billable & NonBillable ...

Hope it is match with your requirment.



View solution in original post

6 Replies
sasikanth
Master
Master

Hi

try some thing like this

IF(WildMatch(MsgCategories,'BILLABLE','*;BILLABLE','BILLABLE;*') and  MsgCategories-=' NONBILLABLE' ,

'Billable)

Not applicable
Author

I need IF(WildMatch(MsgCategories,'BILLABLE','*;BILLABLE','BILLABLE;*'),'Billable')  To show up as Billable  and IF(WildMatch(MsgCategories,'*NONBILLABLE*'),'NonBillable')  AS NonBillable

sasikanth
Master
Master

IF(WildMatch(MsgCategories,'BILLABLE','*;BILLABLE','BILLABLE;*') and 

MsgCategories-=' NONBILLABLE' ,'Billable)

it will gives Billable only

Not applicable
Author

I need IF(WildMatch(MsgCategories,'BILLABLE','*;BILLABLE','BILLABLE;*'),'Billable')  To show up as Billable  and IF(WildMatch(MsgCategories,'*NONBILLABLE*'),'NonBillable') To show up as NonBillable

Not applicable
Author

In Script level try this,

Load

       IF(Wildmatch(MsgCategories,'BILLABLE','*;BILLABLE','BILLABLE;*'),'Billable',

         if(WildMatch(MsgCategories,'*NONBILLABLE*'),'NonBillable')) as Flag


Your flag field consist of two field value  Billable & NonBillable ...

Hope it is match with your requirment.



Not applicable
Author

Thank You so much, It seems like it is working perfectly, however there are messages that can be both billable and non billable, it will not pick that up correct? it will show up as billable only It seems.