Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

IF function

I'm writing a function like:

IF( = {'apple','pear','banana'},'Fruit','Others')

A is a field with values apple, pear, banana, candy, etc.

But the expression editor shows there is error in expression. The error message is: ')' expected.

Any ideas why? Thanks for help!

1 Solution

Accepted Solutions
rubenmarin

Only adding one parenthesys.

If(Match(A, 'apple', 'pear', 'banana'), 'Fruit', 'Others')

View solution in original post

3 Replies
sunny_talwar

Try with Match

If(Match(A, 'apple', 'pear', 'banana'), 'Fruit', 'Others')

Update: Added based on Rubin's response below

rubenmarin

Only adding one parenthesys.

If(Match(A, 'apple', 'pear', 'banana'), 'Fruit', 'Others')

sunny_talwar

Yup