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: 
Not applicable

Condition to exclude data

Hello,

From the below table am trying to achieve the sequence only which has 1,2,3,4 for the test field.

Having a challenge to create the condition to exclude which doesn't have all the 4 Sequences in the script.

It would be great if someone can help on how to restrict test field values which doesn't have all the 4 seq as mean a test field value should have all the 4 seq (i.e, 1,2,3,4 should be present if not restrict).

 

testseq
1164252
1295612
1295613
1396972
1396973
1614102
1749892
2200201
2200202
2210352
2297832
2325991
2379232
2379233
2379522
2388872
102000104
102021811
102021812
102021814
102024453
102021811
102021812
102021813
102021814

Thanks in advance.

21 Replies
Not applicable
Author

Hello Marco,

Didn't try this yet, but would like to give it a try and will let you know.

Thanks with the help.

Kushal_Chawda

I have added some data for testing

Data:
LOAD * Inline [
test,    seq
116425,    2
129561,    1
129561,    2
129561,    3
129561,    4
129561,    5
129561,    6
139697,    2
139697,    3
161410,    2
174989,    2
220020,    1
220020,    2
220020,    3
220020,    4
220020,    5
221035,    2
229783,    2
232599,    1
237923,    2
237923,    3
237952,    2
238887,    2
10200010,  4
10202181,  1
10202181,  2
10202181,  4
10202445,  3
10202181,  1
10202181,  2
10202181,  3
10202181,  4
10202182,  1
10202182,  2
10202182,  3
10202182,  4 ]
;

Left Join
LOAD test,
sum(DISTINCT seq) as Sum
Resident Data
Group by test;


I have created two variables in front end vSeqStart & vSeqEnd for user input.


Seq - 1,2,3,4

Seq - 1,2,3,4,5

Seq - 1,2,3,4,5,6

I have created Straight Table.

Dimension:

test,

seq

Expression: (hidden)

=if(Sum=vSum,seq)

See the Definition of variable vSum

=sum(ValueLoop(vSeqStart,vSeqEnd,1))