Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sujit_nath
Creator III
Creator III

How to exclude possible combinations of few keys?

I have data set such as:

Key

I need to exclude only the highlighted ones. ,, or any combination containing these.

If these are shared with others, these should not be excluded.

I guess wildmatch/match is not possible in this scenario.

Is there a way we can achieve this?

18 Replies
jaumecf23
Creator III
Creator III

Try this:

Where not(WildMatch(Key,'**','**','**'));

sujit_nath
Creator III
Creator III
Author

Thanks Jaume, but this would eliminate , etc. as well, which is not what I want.

tresesco
MVP
MVP

You can try like:

Where not FindOneOf(Key, 'ABCGHIJKLMNOPQRSTUVWXYZ');   // excluding DEF

sujit_nath
Creator III
Creator III
Author

Thanks Tresesco, but A,B,C.. what I mentioned would not actually be alphabets in my data. Also, I won't know these data as these would change frequently. What I have is the values/combinations that need to be excluded (the values would be large though)

Taking these into consideration, the FindOneOf logic won't work.

tresesco
MVP
MVP

You might have to include other possible characters as well in the findoneof() like:

Where not FindOneOf(Key, 'ABCGHIJKLMNOPQRSTUVWXYZ!@#$%abcd...');   // excluding DEF

jaibau1993
Partner - Creator III
Partner - Creator III

What about brute force?

Where not(WildMatch(Key,, , , , , , , , , , , , , , ));


Whit only 3 keys (as in your problem) you can do it in a finite time and it should work (not beautiful but works).


I'll let you know if I find a better way to do it.


Jaime.

tresesco
MVP
MVP

If you need more dynamic solution, you might have to try something like explained here:

How to use regular expressions

Regular expression [A-Z] *

sujit_nath
Creator III
Creator III
Author

Hi Tresesco,

This does not work as expected. I want to exclude all combinations that can be formed from 'D','E','F'   {D,E,F,DE,ED,EF,FE,DF,FD,DEF,DFE,EDF,EFD,FDE,FED}

Though actual data would be large enough.

gerry_hdm
Creator II
Creator II

where not match(Key,,,, )