Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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).
test | seq |
116425 | 2 |
129561 | 2 |
129561 | 3 |
139697 | 2 |
139697 | 3 |
161410 | 2 |
174989 | 2 |
220020 | 1 |
220020 | 2 |
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 |
Thanks in advance.
Hello Marco,
Didn't try this yet, but would like to give it a try and will let you know.
Thanks with the help.
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))