Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
jamelmessaoud
Contributor

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

 

1 Solution

Accepted Solutions

Re: Help with If expression/statement

Try this

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

Re: Help with If expression/statement

Try this

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

Re: Help with If expression/statement

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

I would never have figured this one out Smiley Tongue