IFELSE Syntax is Incorrect


I am new to Quicksight and I am trying to create a calculated field using the ifelse function. This is the calculated field expression:

ifelse( {allModulesOffline}=1 AND {status}="active", "Offline",

However, I am getting the following error:

The syntax of the calculated field expression is incorrect. Correct the syntax and choose Create again.

Can anyone help me?

I am sorry if this is a very basic question, but I am new to this and I am really trying to learn!

Hi @jcatulo,
Welcome to the community!

Without more context around the datatypes of the fields used in the calculated field, it’s difficult to provide a definite answer, but you would receive such an error for example if your status field is not of type String or your allModulesOffline field not a numeric data type like for example Integer. The data types of the left and right side of a comparison using the = symbol, need to be compatible with each other.

I hope my answer helped to solve your issue. Let us know if this is resolved. And if it is, please help the community by marking his answer as a “Solution”.


Thank you for the reply!

However, the status is of type String and allModulesOffline is of type Intenger.

Screenshot 2023-03-29 at 16.03.24

I really don’t understand how I can solve this error.

Is allModules an aggregation?

1 Like

Hi @jcatulo - Thanks for posting the question. If you can provide your input, problem statement and expected output, it will help for all of us to guide your right solution.

Please provide the details as requested by @Thomas and give some context as well.

Regards - San