Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Script not working

hi all,

i got a requirement there are some values as (a,b,c,d,e,f,g)

where a,b should be OK and rest as Non-Ok

need to create a field with values OK and Non-Ok

1 Solution

Accepted Solutions
PrashantSangle

Hi,

Create Flag in back end.

Like

if(wildmatch(FieldName,'a','b'),'OK','Non - OK') as Flag;

Note: You can use match() or wildmatch() as per requirement.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

8 Replies
sunny_talwar

May be this:

If(Match(FieldName, 'a', 'b'), 'OK', 'Non-Ok) as NewFieldName

MK_QSL
MVP
MVP

If(Match(FieldName,'a','b'),'OK','Non-OK') as Flag

Anonymous
Not applicable

if (value='a') or (value='b'),'OK', 'Non-Ok' as newField

or

if (match(value,'a','b') > 0, 'OK', 'Non-Ok' as newField

PrashantSangle

Hi,

Create Flag in back end.

Like

if(wildmatch(FieldName,'a','b'),'OK','Non - OK') as Flag;

Note: You can use match() or wildmatch() as per requirement.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
nareshthavidishetty
Creator III
Creator III
Author

thanks sunny its working if i give wildmacth in the expression

PrashantSangle

Hi,

Wildmatch() is not case sensitive

where match() is case sensitive

For details search in Help menu.

REgards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sunny_talwar

I guess than use WildMatch if Fieldname can have 'a' and 'A' and both needs to be grouped as OK or you can do this:

If(Match(Lower(FieldName), 'a', 'b'), 'OK', 'Non-Ok) as NewFieldName

nareshthavidishetty
Creator III
Creator III
Author

yes what u said is right i'm grouping a,A