Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
coloful_architect
Creator II
Creator II

selective data load (load script) by using where not match & "AND" /"Or"

Hi experts,

I am struggling with a problem on data manipulation. Trying to exclude some data at my load script.

Here is a simplified example;

Product NameTypesales
A1333
A2816
A3580
B1472
B2718
B3749
B4985
C1831
C2192
C3145
C4402
D188
D2388
D3176

I want to remove all A B C products as long as their type is 1 and 2. But on top of that, I also 

want to remove all C products as long as its type is 1 2 and 3. 

I think I am able to remove all A B C with their same types as 1  and 2. Like this 

where not match ([Product Name], 'A,'B','C', ) or not Match([Type],'1', '2')

but how can I deal with product C 's 3 without impacting others? 

1 Solution

Accepted Solutions
Coloful_Black
Contributor III
Contributor III

you can try to make C as one separate loop like ...

where not match ([Product Name], 'A,'B','C', ) or not Match([Type],'1', '2')

 

and (not match ([Product Name],'C') or not Match ([Type],'3'))

 

pretty make the best of the logic of parenthesis 

View solution in original post

2 Replies
anthonyj
Creator III
Creator III

Hi,

Give this a try. It worked on your test data.

where not (match([Product Name], 'A','B') and Match([Type],'1', '2'))
and not ([Product Name]='C' and Match([Type],'1', '2', '3') );

anthonyj_0-1628471110522.png

 

Regards

Anthony

Coloful_Black
Contributor III
Contributor III

you can try to make C as one separate loop like ...

where not match ([Product Name], 'A,'B','C', ) or not Match([Type],'1', '2')

 

and (not match ([Product Name],'C') or not Match ([Type],'3'))

 

pretty make the best of the logic of parenthesis