Start Free Trial

Alteryx Designer Desktop Discussions

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

Else IF then Malformed Statement

Karl_Spratt
8 - Asteroid

Hi Community,

Need some help please 

I have a column I need to pull the 3rd digit from Examples (11102,11202, 13401, 14104, 12701, 11209)

So I want to say if the 3rd digit is a 1 code it as complete, else if the 3rd digit is a 2 code it as a part, everything else code as an other.

I split the column using Substring([siopseg3],2,1)  I think this will bring back digit 3, then I want to create IF / Then / Else Logic 

Can someone please advise what I'm doing wrong please.

TIA,

Karl. 

 

Karl_Spratt_0-1644930542817.png

 

 

5 REPLIES 5
Thableaus
17 - Castor
17 - Castor

Hi @Karl_Spratt 

 

You're mixing data types. Try to add double quotes to the numbers = "1", = "2", cause your field is a String.


Cheers,

atcodedog05
22 - Nova
22 - Nova

Hi @Karl_Spratt 

 

[part /completes] is a string column hence use condition like

 

[part /completes]="1"

 

With quotes

 

Hope this helps : )

Zas3nfkb
8 - Asteroid

Can you try putting quotes around your numbers? You are defining them as strings in the above function. Otherwise, change the first formula to output number. 

Karl_Spratt
8 - Asteroid

Thableaus and atcodedog05 

That worked guys, really appreciate your help here.. was looking at it and couldn't work out the problem. Duh!!!

Cheers,

Karl. 

 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Karl_Spratt 

Cheers and have a nice day!

Labels
Top Solution Authors