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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
tomdabek
Contributor III
Contributor III

Excluding Rows on Load with WHERE AND

Hi, New user to Qlikview and trying to exclude certain rows with my load statement:

LOAD    

   ..........

FROM [$(vPath)\*.xlsx]

(ooxml, embedded labels, table is QLIK)

WHERE NOT WildMatch ([Plant Number] , '10844', '10846') 

OR (NOT [Plant Number] = '20531' AND [Material Number] = 'AG6604');

The 1st part works, any entry in the data where [Plant Number] is 10844 or 10846 is excluded

However, all records for [Plant Number] 20531 are excluded when I only want the ones where the [Material Number] is AG6604 excluded

I have tried a few combinations but am unable to figure out how to exclude loading a row using a rule that includes two (or more)  of the columns in the criteria.

Thank You

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this:

WHERE NOT WildMatch ([Plant Number] , '10844', '10846')

OR ( [Plant Number] <> '20531' AND [Material Number] <> 'AG6604');


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this:

WHERE NOT WildMatch ([Plant Number] , '10844', '10846')

OR ( [Plant Number] <> '20531' AND [Material Number] <> 'AG6604');


talk is cheap, supply exceeds demand
tomdabek
Contributor III
Contributor III
Author

Thank You,

I must have misrepresented my original question, but your solution is correct except I changed the "OR" to "AND" to apply the filter to both situations I am trying to prevent from loading.

WHERE NOT WildMatch ([Plant Number] , '10844', '10846')

OR   AND  ( [Plant Number] <> '20531' AND [Material Number] <> 'AG6604');