Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
20
Contributor II
Contributor II

Expression Error ')' expected

All brackets are closed in this string, not sure what is wrong here, continuing to get expression error ')' expected

=if((type='X' or type='Y') and Level2!='Z' and InsightSentiment<=X' and Score<='Y', Level3)

I want to display Level 3 if type is X or Y, sentiment and score are less than X and Y, and as long as Level 2 is not Z. 

 

Thanks 

1 Solution

Accepted Solutions
er77
Partner - Creator
Partner - Creator

great! can you mark my answer as Solution to your question?

View solution in original post

8 Replies
tresesco
MVP
MVP

Error message always can't tell the exact issue. Most of the time it is indicative; you have to debug and find the real issue. Here it could be just a missing quote (in red below):

=if((type='X' or type='Y') and Level2!='Z' and InsightSentiment<='X' and Score<='Y', Level3)

20
Contributor II
Contributor II
Author

Thank you for your response, unfortunately there is still an error 

tresesco
MVP
MVP

Check if there are spaces between the separate literals. Could you post a screenshot of the error (with the entire expression)?

20
Contributor II
Contributor II
Author

 

Please see below! 

 

 

er77
Partner - Creator
Partner - Creator

I found the problem; try with this:

=if((type='X' or type='Y') and Level2<>'Z' and InsightSentiment<='X' and Score<='Y', Level3)

Please note you are missing ' before X' and not equal must be <> and not 1=

Let me know if works.

er77
Partner - Creator
Partner - Creator

try to replace != with <>

20
Contributor II
Contributor II
Author

Great, thank you that works!!

er77
Partner - Creator
Partner - Creator

great! can you mark my answer as Solution to your question?