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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Include only certain values in script

In my script, I want to have a condition where I keep only certain values. At the end of my script I have FROM [Data Source......] WHERE(team = 'ABC') and (team = 'DEF')......and this repeats eight more times. The script does not function at that point. Is there a more efficient way to do this>?

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable

try use of match

where match(team,'ABC','DEF','GHI')>0

-> add more conditions

suppose you want not Team = 'ABC' and Team = 'DEF' as Team only can hold one value

View solution in original post

5 Replies
Anonymous
Not applicable

try use of match

where match(team,'ABC','DEF','GHI')>0

-> add more conditions

suppose you want not Team = 'ABC' and Team = 'DEF' as Team only can hold one value

vishsaggi
Champion III
Champion III

Can you explain a little more what you mean by repeats 8 more times, but you are saying in the end of the script you have a where condition?

neelamsaroha157
Specialist II
Specialist II

I think another approach could be use of 'Match' function -

Where Match(team, 'ABC','DEF', you can add more values)

Or you can create a variable with Set vTeamVar = your values and use this variable in match function -

Where Match(team, $(vTeamvar))

evansabres
Specialist
Specialist
Author

Thank you

evansabres
Specialist
Specialist
Author

Apologies the question wasn't posed better, but was able to receive help. Thank you for your help