Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

conditional if statement?

Hi all,

How to represent the multiple values for a filed in the if condition:

PLT  IN   ( 'ANMF','Partenon','UFSS'  )

COD2  IN  ( '1006'  )

if(COD2='1006'  AND PLT =( 'ANMF','Partenon','UFSS'  )

Iam using if condition as the conditional dimension for the bar chart. I tried with different options but not succeed.

Your help is greatly appreciated..

Regards

Siva

1 Solution

Accepted Solutions
Ralf-Narfeldt
Employee
Employee

if(COD2='1006'  AND match(PLT,  'ANMF','Partenon','UFSS' ))

View solution in original post

7 Replies
Anonymous
Not applicable
Author

try this

=if((COD2='1006')  AND (match(PLT,'ANMF','Partenon','UFSS' )>0)

Ralf-Narfeldt
Employee
Employee

if(COD2='1006'  AND match(PLT,  'ANMF','Partenon','UFSS' ))

PrashantSangle

Hi,

You can use match() or wildmatch() or mixMatch()

For  details go  and check it 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 🙂
sasiparupudi1
Master III
Master III

if((match(COD2,'1006')>0  AND match(PLT, 'ANMF','Partenon','UFSS')>0),'True','False')

Not applicable
Author

Try like this

if(COD2='1006'  AND (PLT = 'ANMF' OR PLT='Partenon'  OR PLT='UFSS'  ),..........)

jonathandienst
Partner - Champion III
Partner - Champion III

If this is for an aggregation function like Sum or Count, rather use set analysis:

Sum({<COD2 = {1006}, PLT = {'ANMF', 'Partenon', 'UFSS'}>} Value)

This will perform better than Sum(If())....

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks for all your replies...

is this same for not equal sign? I mean for " not maching"

For ex:

 

ID= '01'

AND NOT(GRU='30390000' AND CON='A90' AND VAL IN ('IN1','IN2')))"

Regards

Siva