Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue in if condition for excluding?

Hi,

maxgro‌ , swuehl

How do I write the if condition for excluding?

PCR = {111,1117,123,134}
Say if I want to include {111,1117} in my report

I would wite it as if(match(PCR,111,1117))

But how do I write the same if I want to exclude?
Can someone please tell me the opposite expression for match?

Thanks in advance.

Reagrds,
Sachin

5 Replies
swuehl
MVP
MVP

if( not match(PCR,111,1117), ThenBranch, ElseBranch)

Not applicable
Author

I tried but not match is not getting recognized as a function.

sunny_talwar

There needs to be a space between not and match:

Capture.PNG

the text for not and match turned blue mean they are getting recognized as functions.

HTH

Best,

Sunny

ramoncova06
Partner - Specialist III
Partner - Specialist III

if you are creating a calculated expression you could use concat or only combined with aggr

something like

aggr(concat({<PCR -={111,1117,123,134}>}PCR), PCR)

swuehl
MVP
MVP

Do you get an error telling so?

I believe it should work, but you can also use:

if( match(PCR,111,1117)=0, ThenBranch, ElseBranch)