Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Error when trying to close an Else IF Expression

Karl_Spratt
8 - Asteroid

Hi Folks,  I know you will think it's easy but I can't figure it out...Error when trying to close an Else IF Expression  when I but the ENDIF (F) on the word, my nice formula 🙂 goes into malformed expression, all the "code text " goes black.

See attached, anyone know how I can resolve this?

 

Capture.PNGC1.PNG

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @Karl_Spratt try removing the " from 0.6 and 0 numeric arguments do not need quotes.

jacob_kahn
12 - Quasar

Oh the pain in the amount of times I've made this mistake! The suggested solution has been my savior multiple times!

RobertOdera
13 - Pulsar

Hi, @Karl_Spratt 

 

Try this.

1.  add a select tool before the formula tool to profile the Type and Size of your data.

Notice is the data is Text, Number, Byte etc., and change accordingly if just a few fields (run Multi-Field Tool if changing many fields).

 

2. Nest fields in ToString() or ToNumber() as appropriate to avoid malformed expressions.

If a field value is a number then nesting it in "" or '' (double or single quotations) will result in malformed argument

If a field value is a text then NOT nesting it in "" or '' (double or single) will result in malformed argument

 

Looks like [%Available] is a number - remove quotations

If still doesn't work then that implies [Future Stockout Cal] is also a number - remove quotations as well

Should be good-to-go

 

Alteryx IF arguments end in ENDIF

 

Cheers!

 

 

Karl_Spratt
8 - Asteroid

Bingo genius thank you all C1.PNG

Labels