Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sujit_nath
Creator III
Creator III

Exclude sequence patterns

Hi,

I have data set such as:

Table:

IDValue
[1][2][3][4]E|E|E|
[3][2][1]E|E|E
[2][1]E|E
[1][3]E|E
[3][7]E|
[7][2][1]|E|E
[2][1][4]E|E|

I need to exclude the Bold rows in the next table where I load them.

The logic behind this is: I need to exclude the combinations where I see [1] , [2] or [3]

if it is [1] in ID, I'm adding E as value.

the data is concatenated thereafter.

So, a value of [1][4][5]  will have values as : E||

Again, coming back to the original ques, I need to exclude all those ID's where Value starts and ends with E and there is no ||  (double pipe) in between.

Could anyone suggest a process to do so? Help would be much appreciated.

1 Solution

Accepted Solutions
MarcoWedel

Thanks, I'm glad it worked for you.

Please close your thread if your question is answered:

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco

View solution in original post

11 Replies
Anil_Babu_Samineni

How you want to see in second table after that?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sujit_nath
Creator III
Creator III
Author

In the second table I simply need to load the ID's that are not bold. I'll only use the value field to decide which ID's to include.

Anil_Babu_Samineni

Does this helps in your case?

Sample:

Load ID, Value From Sample;

Final:

NoConcatenate

Load ID, Value Resident Sample Where Not WildMatch(ID, '[3][2][1]', '[2][1]', '[1][3]');

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sujit_nath
Creator III
Creator III
Author

Thanks Anil, but I forgot to mention.. this is a sample data. I need to put some generic rules in the where condition which would pick up these.

boorgura
Specialist
Specialist

Your where clause would be on the lines of:

where not ((left(Value,1) = 'E' and right(Value, 1) = 'E' and WildMatch(Value, '*||*') = 0));

That is - trying to exclude the record where Value starts and ends with E and as well there are no occurances of ||

MarcoWedel

Hi,

one example:

QlikCommunity_Thread_297878_Pic1.JPG

table1:

LOAD ID,

    Value

FROM [https://community.qlik.com/thread/297878] (html, codepage is 1252, embedded labels, table is @1)

Where not Value like 'E*E' or Value like '*||*';

hope this helps

regards

Marco

sujit_nath
Creator III
Creator III
Author

Perfect!! This would help me

MarcoWedel

Thanks, I'm glad it worked for you.

Please close your thread if your question is answered:

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco

sujit_nath
Creator III
Creator III
Author

How do I close this thread Marco? Apologies for the silly ques