Alteryx Designer Desktop Discussions

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

String to Function

WKiehn
7 - Meteor

Hi,

 

I have a table with different variables and and various formulas in one column. Does anybody know what I have to do that the Formula Tool interprets the column with the formula as function and not as string?

 

Example:

EWFLFORMULA
100100[EW/[FL]
200100[EW]
310000[FL ]+[EW]
70025Round([EW]/[FL],1)+LOG(0.5)

 

Thanks!

 

 

8 REPLIES 8
CRowlatt
8 - Asteroid

The formula tool should not add the column as a string, unless there is quote marks around the formula you've written? The tool applies 1 formula to each row, so will not be able to produce different rows within 1 column as shown in your table. 

 

I'm not sure I fully understand. are you able to attach the workflow you are working on?

 

ChrisTX
15 - Aurora

Use the Dynamic Replace tool

danilang
19 - Altair
19 - Altair

Hi @WKiehn 

 

The Dynamic Replace found in the Developer group can evaluate formulas that are contained in string fields, if you check the "Values are Expressions/Formulas".  The one caveat is that the formula will be applied to all the records in the dataset.  If you have differing formulas for each row, you'll have to wrap it in a batch macro that processes the records one a time

 

Dan

estherb47
15 - Aurora
15 - Aurora

Hi @WKiehn ,

 

Echoing what @ChrisTX mentioned about the Dynamic Replace tool.

 

Here's a great Tool Mastery article on the tool. Hope that helps! https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Tool-Mastery-Dynamic-Replace/ta-p/121655

Cheers!

Esther

WKiehn
7 - Meteor

Thanks Dan!

 

Dynamic Replace is a great tool and with the batch macro it solves my issue.

 

@Esthter: Thanks for the link, it's very helpful.

 

Werner

Rondo
5 - Atom

Hi. I'm trying to accomplish the same but struggling with the configuration of the dynamic replace within the batch. Are you able to share your example for me to emulate? Thanks.

WKiehn
7 - Meteor

Please try the followoing example workflow.

 

Werner

Rondo
5 - Atom

Perfect; I hadn't adjusted the union settings in the macro. Thank you!!!

Labels