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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script To Exclude Multiple Values?

I have the following WHERE clause that I use to exlude multiple values from the "PLANT_CD" field. While this script works, I have other exclusions I must make that involves many more values for a particular field.

WHERE (PLANT_CD <> '$(vXcludeLoc1009)' AND PLANT_CD <> '$(vXcludeLoc3301)' AND PLANT_CD <> '$(vXcludeLoc3302)';

My question: Is there a way to modify the above script so that I do not have to list each exclusion individually?

For example, can I do a version of the following:

WHERE (PLANT_CD <> '$(vXcludeLoc1009)'; '$(vXcludeLoc3301)'; '$(vXcludeLoc3302)';

Any assistance is much appreciated.

Thank you,

Godfrey



1 Solution

Accepted Solutions
Not applicable
Author

Hi there, try this:

WHERE not match(PLANT_CD, '$(vXcludeLoc1009)', '$(vXcludeLoc3301)', '$(vXcludeLoc3302)');

View solution in original post

2 Replies
Not applicable
Author

Hi there, try this:

WHERE not match(PLANT_CD, '$(vXcludeLoc1009)', '$(vXcludeLoc3301)', '$(vXcludeLoc3302)');

Not applicable
Author

Thank you Ivan, this works perfectly!

Thank you,

Godfrey