Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Conditional IF statement to show / hide expressions

Hi all

i have a straight table with 10 expressions, the users want to be able to select which columns they want to view so i have created an inline table with the column names and i am using it in a list box set as LED checkboxes.

i then have a conditional show on each expression..

if(Field = 'ColumnA',1,0)

changing the value for each conditional expression.

obviously this doesn't work if multiple values are selected in the inline field.

does anyone know how i can achieve this please?

sample attached

1 Solution

Accepted Solutions
sunny_talwar

May be this

SubStringCount(Concat(DISTINCT '|' & Column & '|'), '|A|') = 1 and GetSelectedCount(Column) >= 1

View solution in original post

4 Replies
ychaitanya
Creator III
Creator III

Hello

You could try

matching multiple ways for the 10 different expressions

SubStringCount(Concat(Field, '|'), '1')

The second won't work without an if:

=if(SubStringCount(Concat(Field, '|'), 'Exprname')>1,1,0)


OR


WILDMATCH(Concat(distinct FIELD),'*Expr Name*')>0

sunny_talwar

Something like this

Capture.PNG

Used this

SubStringCount(Concat(DISTINCT '|' & Column & '|'), '|A|') = 1

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi Sunny,

if none are selected, how do i get it to not show any of the expressions?

at the moment it shows all if none are selected

sunny_talwar

May be this

SubStringCount(Concat(DISTINCT '|' & Column & '|'), '|A|') = 1 and GetSelectedCount(Column) >= 1