Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Drece-gkn
Contributor III
Contributor III

WHERE clause for multiple values

Hello I have an app that I am making adjustments to. In the script we have a Where clause that says WHERE "Material Number" = 'x' (Made up material number as I can show those). I want to change this to include more Material Numbers. So I want the clause to say WHERE "Material Number" = 'x','y','z' but commas give me an error. What is the proper way to write this clause?

Labels (1)
2 Solutions

Accepted Solutions
Clement15
Creator III
Creator III

Hello,

 

I don't know if this is the most optimized way, but you can do this.

 

WHERE "Material Number" = 'x' or "Material Number" = 'y' or "Material Number" = 'z'

 

View solution in original post

Anil_Babu_Samineni

Perhaps I may do this WHERE Match("Material Number", 'x', 'y', 'z')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Clement15
Creator III
Creator III

Hello,

 

I don't know if this is the most optimized way, but you can do this.

 

WHERE "Material Number" = 'x' or "Material Number" = 'y' or "Material Number" = 'z'

 

Anil_Babu_Samineni

Perhaps I may do this WHERE Match("Material Number", 'x', 'y', 'z')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
anat
Master
Master

where match(Material Number,'x','Y','Z')