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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
pennetzdorfer
Creator III
Creator III

Check 'Does the current selection contain XY'?

I need to check whether the current selection contains any Austrian orders or not. Therefore I created a textbox with the following expression:

if(substringcount(Concat(distinct Country,'|'),'Austria')=1,'yes','no')

I think that's not 100% safe. Let's assume there is a Country 'AustriaXYZ' ... my expression would return 'yes' -> which is wrong!

I guess there should be a better way ... Any suggestions?

Please find the attached sample qvw.

Regards,

Florian

1.jpg

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You could surround the values with some marker character:

if(substringcount(Concat(distinct '~' & Country & '~' ,'|'),'~Austria~')=1,'yes','no')


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You could surround the values with some marker character:

if(substringcount(Concat(distinct '~' & Country & '~' ,'|'),'~Austria~')=1,'yes','no')


talk is cheap, supply exceeds demand