Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

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

You could surround the values with some marker character:

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


talk is cheap, supply exceeds demand