Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Multi conditional statement

MHS
8 - Asteroid

Happy new year everyone!

 

Was hoping that someone in the community would be able to assist with a conditional statement that I am writing in the formula tool.  When running the workflow I am getting an error message that reads "The field "" is not contained in the record".  The data that I am working with is formatted as an integer.

 

IF [Group By_JIRA Form] = "Capability" THEN
54*(((6*.5)*([Created count]+[Updated count])/60/60))
ELSEIF [Group By_JIRA Form] = "Capability ROM" THEN
54*(((3*.5)*([Created count]+[Updated count])/60/60))
ELSEIF [Group By_JIRA Form] = "Epic" THEN
54*(((4*.5)*([Created count]+[Updated count])/60/60))
ELSEIF [Group By_JIRA Form] = "Story" THEN
54*(((7*.5)*([Created count]+[Updated count])/60/60))
ELSEIF [Group By_JIRA Form] = "Project Task" THEN
54*(((13*.5)*([Created count]+[Updated count])/60/60))
ELSE "Null"
ENDIF

 

Any help would be appreciated!

8 REPLIES 8
mmenth
11 - Bolide

Did you name the new field you are trying to make? It's easy to forget as it says 'Select Column' until you select an existing column or enter a new one.

 

Best,

mmenth

MHS
8 - Asteroid

Hi Bolide, 

 

Yes I named the column.  Just wondering if anyone had any info on that error message.

 

Thanks, 

 

Matt

mmenth
11 - Bolide

Hmm I've only seen that error when a formula is missing a column name. I would double check your other formula tools in the workflow, or if possible, upload the workflow here so that we can take a look. If you haven't done this before, go to Options -> Export Workflow, this will give a yxzp which others can import without having your raw data.

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @MHS,

 

Did you manage to export as a packaged workflow for us to take a look?

 

Regards,

Jonathan

MHS
8 - Asteroid

Hi Guys,

 

Attached is the workflow, thanks again for all the help!

 

Matt

ashissanpui
9 - Comet

@MHS  you formula seems to be OK. This might be the issue with your new field data type or one of the filed from your file is missing.

AShis

echuong1
Alteryx Alumni (Retired)

Your second formula in the formula tool needs to have a column name specified.

 

Also, the syntax for the second formula is incorrect. The "ELSE" statement cannot have conditions in it. I would change the last ELSE to be ELSEIF and then have ELSE NULL() at the end before ENDIF. See below: 

 

IF [Group By_JIRA Form] = "Capability" THEN
54*(((6*.5)*([Created count]+[Updated count])/60/60))
ELSEIF [Group By_JIRA Form] = "Capability ROM" THEN
54*(((3*.5)*([Created count]+[Updated count])/60/60))
ELSEIF [Group By_JIRA Form] = "Epic" THEN
54*(((6*.5)*([Created count]+[Updated count])/60/60))
ELSE NULL() ENDIF

 

echuong1_0-1577977382829.png

MHS
8 - Asteroid

Got it, thank you very much!

Labels