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

Where Statement

Hello,

I am trying to exclude certain data from a QVD and am having issues - thus far i have indicated in the where statement that i need the material number to be < and > a specific number. i have also indicated that the brand must = 'A' or 'B' or 'C'. Now i am trying to exclude a subcategory but it will not work for some reason. I have used both 'AND' and 'OR' - the spare parts fall within each brand, i just do not want to see spare parts.

Any ideas as to what i am missing?

Thanks for your help,

Parrish

5 Replies
m_woolf
Master II
Master II

Please provide your where clause.

Not applicable
Author

Where MATERIAL_NUMBER > 999999 and MATERIAL_NUMBER<10000000 and Brand='A' or Brand='B' or Brand='F' and Product <>'Spare Parts';

maxgro
MVP
MVP

from your description it should be

where

matnum > 10 and matnum <20

and match(brand, 'A', 'B', 'C')

and not match(subcat, 100)

Not applicable
Author

the and match worked but not the not match - after i closed the match function, i just went back to doing subcat<>'A' and that worked. thank you for the help

Clever_Anjos
Employee
Employee

Where MATERIAL_NUMBER > 999999 and MATERIAL_NUMBER<10000000

and Match(Brand,'A','B','F')

and Product <>'Spare Parts';


Be careful when mixing AND and OR

OR clauses are evaluated after AND clauses


True And False Or True // evaluates true