Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

if() match () with several expressions in script?

Hi guys,

is it possible to select several expressions like that ?

search is select all the X:

X >=400000

X <=599999

X = 677000

X = 688000

X IS NOT = 494500 494700 494800

if tried with

If(WildMatch("X",'4?????','59????','677000','688000'),'TEST') as TEST

But I don't know, how to NOT SELECT expresions ?

Kind regards.

Tags (3)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: if() match () with several expressions in script?

if( ((X >= 400000 AND X <= 599999) OR match(X, '677000', '688000')) AND NOT match(X, '494500', '494700', '494800'), 'TEST') as TEST


talk is cheap, supply exceeds demand
3 Replies

Re: if() match () with several expressions in script?

I think it is not possible with only one wildmatch ... you must use at least two, one to include and one to exclude.

Pay attention to the sysntax, first use the whole string , then the other to compare so:

If(WildMatch(TEST, "X",'4?????','59????','677000','688000')) as TEST

MVP
MVP

Re: if() match () with several expressions in script?

Try like:

If(WildMatch("X",'4?????','59????','677000','688000') and Not Match("X",'494500' ,'494700', '494800')  ,'TEST') as TEST

MVP & Luminary
MVP & Luminary

Re: if() match () with several expressions in script?

if( ((X >= 400000 AND X <= 599999) OR match(X, '677000', '688000')) AND NOT match(X, '494500', '494700', '494800'), 'TEST') as TEST


talk is cheap, supply exceeds demand