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: 
Dik
Contributor II
Contributor II

Calculated field with 'if' formula and 'AND' operator referring to different data fields

Hi guys,

A newbie question (I guess)... I try to implement one calculated field in my data table with the following ‘if’ formula:

If([A]<>'Content01' AND [B]<>'Content02','Output01',If([A]<>'Content01' AND [B]='Content02','Output02','Output03'))

But unfortunately I get always the error: “Missing right parenthesis”. As additional information, I can say the fields [A] and [B] are text fields as well as all outputs fields. Isn’t it possible to use AND within an ‘if’ formula in calculated fields?

A helping hand would be great. Thank you!

Labels (3)
1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi Dik,

There are no newbie questions.. but mentioning this seems that you haven't used it a lot, are you using the Data Manager? Because it's not possible to add AND statements in a newly created field.

Jordy

Climber

Work smarter, not harder

View solution in original post

4 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Can u attach sample qvf so I can try it out

Thanks

Thanks and Regards
Kashyap.R
JordyWegman
Partner - Master
Partner - Master

Hi Dik,

There are no newbie questions.. but mentioning this seems that you haven't used it a lot, are you using the Data Manager? Because it's not possible to add AND statements in a newly created field.

Jordy

Climber

Work smarter, not harder
Dik
Contributor II
Contributor II
Author

Hi guys,

Yes, I'm trying to create this new calculated field within the data manager. What a pity that it isn't possible to work with AND there. But nevertheless, thank you for your feedback. At least I know I don't have to keep trying it that way. 

BR, Dik

JordyWegman
Partner - Master
Partner - Master

Yes it's a shame, seems like an easy option so I don't know why it isn't added.

Jordy

Climber

Work smarter, not harder