Alteryx Designer Desktop Discussions

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

Completing elseif statement

PrashantJP
7 - Meteor

Hi Folks,

 

I am unable to completely execute my elseif statement. Could you please help me with the same. 

 

If [NAV Entry By] = "D488159" then "Sachin"

elseif [NAV Entry By] = "R692964" then "Sandeep"

elseif [NAV Entry By]= "D603496" then "Divya"

elseif [NAV Entry By] = "I741128" then "Prashant"

elseif [NAV Entry By] = "R605432" then "Khushnuma"

elseif [NAV Entry By] = "N711552" then "Ninad"

elseif [NAV Entry By] = "E451667" then "Ritika"

elseif [NAV Entry By] = "V639741" then "Savio"

else if [NAV Entry By] = "V229532" then "Joshua"

else "Blank"

endif

5 REPLIES 5
Qiu
21 - Polaris
21 - Polaris

@PrashantJP 
I think it is simply because there is an exra space between the last "Else if".
And for this case, I would recommend using of Find and Replace tool as below, which is easy for maintenance by adding more entries without modifying the formulas.

0403-PrashantJP.PNG0403-PrashantJP-1.PNG

PrashantJP
7 - Meteor

Many thanks @Qiu ! Greatly appreciate!!

Qiu
21 - Polaris
21 - Polaris

@PrashantJP 
Glad to be helpful.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@PrashantJP ,

 

@Qiu  quickly identified the root-cause of your Else If dilemma. I like to use a FIND REPLACE tool instead of a long list of replacements.  The tool allows you to append the name instead of replacing.  But there is also SWITCH().  It uses fewer keystrokes to write and never worries about the space. 

Switch([NAV Entry By],"Blank", "D488159","Sachin","98765","Qui","C12345","MarqueeCReW")

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Qiu
21 - Polaris
21 - Polaris

@MarqueeCrew 
Thank you for the comment and also tip for using Switch function.
I rarely using it so far, and would like to try it more. 
Answering questions here really improve myself 😁.

Labels