Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
padmanabhv
Contributor III
Contributor III

If condition with multiple THENs / if condition with 'show all except one' in then

Hello,
Lets say I have data in 4 columns, user and value1, value2, value3
each user could have value 0,1 or 2 for each of the values.

If a person selects 'value2'
I need a function to apply that would then show me all data where value2 is equal to 1 or 2 (basically non-zero)

I can make it work to only show 1 or 2 using 
= if (GetFieldSelections([$Field]) LIKE '*value2*',1,'ALL')
or 
= if (GetFieldSelections([$Field]) LIKE '*value2*',2,'ALL')

But how do I make it work if I want it to show all non zero values, be it 1 or 2
= if (GetFieldSelections([$Field]) LIKE '*value2*',(WHAT DO I PUT HERE? ),'ALL')

Appreciate any help! Thank you !

Labels (2)
1 Solution

Accepted Solutions
padmanabhv
Contributor III
Contributor III
Author

To answer my own question,
instead of using 'Select values in field'

I used 'Select values Matching Search Criteria' 
and
= if (GetFieldSelections([$Field]) LIKE '*value2*','>0','ALL')

And got it to work !

View solution in original post

1 Reply
padmanabhv
Contributor III
Contributor III
Author

To answer my own question,
instead of using 'Select values in field'

I used 'Select values Matching Search Criteria' 
and
= if (GetFieldSelections([$Field]) LIKE '*value2*','>0','ALL')

And got it to work !