Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF Question

Hi,

has someone an idea how I can handle something like this:

if(category = '1' OR category '2', 'all', if(category='2', 'only 2')) AS categoryclass

thanks

Aloah

4 Replies
Not applicable
Author

Please key in your question with some explanations to what you need..

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hello,

What about that Condition:

If(category='2',If(category = '1', 'all', 'only 2')) AS categoryclass

Not applicable
Author

In your data can a single record have more than a single value the field category? Understanding the potential values of the field will help suggest the correct syntax of your conditional statement.

/emb


brenner_martina
Partner - Specialist II
Partner - Specialist II

Pardon, there is the bracket wrong:

If(category='2',If(category = '1', 'all'), 'only 2') AS categoryclass