Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Help with If expression/statement

Hi guys,

Not sure if this is possible or not?

I would like to create an expression based on selections made from a filter pane.

Basically i have a filter pane with a field called "Band" and I've created the following if expression if(Band = [Postcode Band],'YES','NO').  

Capture1.JPGCapture2.JPG

This will work if a single selection is made but when multiple selections are made it doesn't work.  Ideally I would like to see "YES" if any selection of band is made.  For example choose bands 1 3 and 5 then the Yes will appear next to those postcode bands.

Hopefully this makes sense.  I've just to explain this in the simplest form! Smiley Happy

Thanks
J

 

Labels (3)
1 Solution

Accepted Solutions
Highlighted

Try this

If(SubStringCount(Concat(DISTINCT '|' & Band & '|'), '|' & [Postcode Band] & '|') = 1,
'YES',
'NO')

View solution in original post

2 Replies
Highlighted

Try this

If(SubStringCount(Concat(DISTINCT '|' & Band & '|'), '|' & [Postcode Band] & '|') = 1,
'YES',
'NO')

View solution in original post

Highlighted
Creator
Creator

That has worked a treat! Thanks so much Sunny Smiley Happy

I would never have figured this one out Smiley Tongue