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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Funciotion if with multiple values

Hi I nedd to create a new field to summarize information coming form another field saying:

- if (field A="1or2", then 'OK',

- if (field A= "3or4or5or6", then KO"

- if (field A= "7or8or9 then "MAYBE"

How can i put togheter?

Thanks in advance

Bruno

Labels (1)
1 Solution

Accepted Solutions
stabben23
Partner - Master
Partner - Master

Hi Bruno, then put all numbers between 'x'. Like if(field A='1' or '2', 'OK'............

View solution in original post

3 Replies
stabben23
Partner - Master
Partner - Master

Hi Bruno, this should work: If(field A=1 or 2, 'OK, if(field A = 3 or 4 or 5 or 6, 'KO', if(field A= 7 or 8 or 9, 'MAYBE'))) as new_field.

Not applicable
Author

are u sure If(field A=1 or 2 is working?

When i got just one value for category i write it as If(field A='1')

stabben23
Partner - Master
Partner - Master

Hi Bruno, then put all numbers between 'x'. Like if(field A='1' or '2', 'OK'............