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

Expression not working

if([NCR_TYPE]='RI','Receiving Inspection',[NCR_TYPE])  and if([NCR_TYPE]='IP','In-Process',[NCR_TYPE])  as [Flag],

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you don't use wildcards, you don't need the wildmatch() function. And instead of multiple if() statements, you can use a pick() / match() combination:

pick( match(NCR_TYPE,'RI','IP')+1     //+1 to return 1 for no matching value

,'NULL'

,'Receiving Inspection'

,'In-Process'

)

as [Flag]

View solution in original post

4 Replies
swuehl
MVP
MVP

What do you get returned? -1 for all records?

And what do you expect as result for different input values?

'Expression not working' is not really helpful to understand your requirement.

Not applicable
Author

  Trying to chage the feild value..

I could get using Wildmatch

if

(wildmatch(NCR_TYPE,'RI'),'Receiving Inspection',

if(wildmatch(NCR_TYPE,'IP'),'In-Process',

if(wildmatch(NCR_TYPE,'',' ') or isnull(NCR_TYPE),'NULL'))),

swuehl
MVP
MVP

If you don't use wildcards, you don't need the wildmatch() function. And instead of multiple if() statements, you can use a pick() / match() combination:

pick( match(NCR_TYPE,'RI','IP')+1     //+1 to return 1 for no matching value

,'NULL'

,'Receiving Inspection'

,'In-Process'

)

as [Flag]

Not applicable
Author

It worked .Thank you.