Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Search for an exact match

Hi,

I'm having the following problem.

I need to search for a combination of letters (i.e. AB) in a string.

The following situations can occur in the string to be search in. Only the ones marked with a !! should be returned as correct

  • ABC
  • C,AB,D,E !!
  • D,E,A
  • ABCDE, A

The logic should be:

search for a string, which is an exact match, knowing that the string to search in can be a single word, or a list of words separated by either a comma or a space (or a combination of both).

This is what we currently have... but this gives too many results

If((index(searchin, searchfor)=0), 'Yes', 'No')

Thanks!

Maarten

Labels (1)
2 Replies
Not applicable
Author

hi

try like this

=if(substringcount('String','a')<>'0' and substringcount('string','b')<>'0', 'Yes','No')

regards

A'run'

Not applicable
Author

Hi A'run'

So if I get it right, you would do this for every character...

Knowing that this needs to be used on every row of a table, it is impossible to predict the number of characters. Correct me if I'm wrong ofcourse 🙂

Thanks for your help!

Regards,

Maarten