Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

If condition with OR AND

RaviTeja_1001
7 - Meteor

Hi 

 

Good Day.

 

Can some one please help me on the below formula?

 

IF [F21]!=[F28] AND [F34]=5 AND [F28] ="United Arab Emirates"
THEN "?"
ELSEIF [F21]!=[F28] AND [F34]=0 AND [F21]="United Arab Emirates"
THEN "?"
ELSEIF [Branch / Subsidiary]="Branch" or "Inter VAT Group" or "Dummy"
THEN "OS"
ELSEIF [Branch / Subsidiary]="Subsidiary"
THEN "ZR"
ELSEIF [F34]=0
THEN "SR"
ELSE "CHECK"
ENDIF

 

Below is the error message "Error at char (0): Invalid type in operator ==. (Expression #5)

 

Thanks

9 REPLIES 9
atcodedog05
22 - Nova
22 - Nova

Hi @RaviTeja_1001 ,

 

Below is not a supported Alteryx condition

atcodedog05_0-1589437671096.png

 

Change it to

ELSEIF [Branch / Subsidiary] in ("Branch","Inter VAT Group","Dummy")

 

Hope that helps

 

Cheers and Happy analyzing : )

RaviTeja_1001
7 - Meteor

Hi @atcodedog05,

 

Thanks for your support.

 

Even after making changes as per below, im still having the same error. Not sure if there is any other condition to be changed.

 

Thanks

atcodedog05
22 - Nova
22 - Nova

Hi @RaviTeja_1001 ,

 

Can you share sample data. Like 2 or 3 records of data in a sample file.

 

Will be able to help you better.

RaviTeja_1001
7 - Meteor

Hi

 

Please find the attached sample data file with formula.

 

Thanks

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @RaviTeja_1001 ,

 

Your workflow is missing the data file. Either share the data file or a packaged workflow.

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @RaviTeja_1001,

 

Can you also please attach the excel file you use as the input?


Regards,

Jonathan

atcodedog05
22 - Nova
22 - Nova

Hi @RaviTeja_1001 ,

 

Here is what the issue was.

atcodedog05_0-1589444810092.png

Your F34 column is string type. Hence [F34]=0 was creating an error when it was changed to [F34] its fixed.

 

IF [F21]!=[F28] AND [F34]=5 AND [F28] ="United Arab Emirates" THEN "?"
ELSEIF [F21]!=[F28] AND [F34]=0 AND [F21]="United Arab Emirates" THEN "?"
ELSEIF [Branch / Subsidiary] in ('Branch','Inter VAT Group','Dummy') THEN "OS"
ELSEIF [Branch / Subsidiary]="Subsidiary" THEN "ZR"
ELSEIF [F34]="0" THEN "SR"
ELSE "CHECK" ENDIF

 

Please check and let me know

 

 

 

 

RaviTeja_1001
7 - Meteor

Hi 

 

Thanks for your support. Now its working fine.

atcodedog05
22 - Nova
22 - Nova

Hi @RaviTeja_1001 ,

 

Glad to hear : )

 

Can mark my solution as "Accept solution" if it helped to solve your usecase.

 

Thank you : )

 

Cheers and Happy Analyzing

Labels
Top Solution Authors