Alteryx Designer Desktop Discussions

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

Formula In-DB (The expression attribute is required)

etl_anu
6 - Meteoroid

Hi,

 

I am getting an error "The expression attribute is required" in the Formula In-DB part when I try to run my workflow. Essentially what I am trying to do is to create a variable C from A and B which is for eg. C=(A-B)/B. The only component before the Formula In-DB component is the "Connect In-DB" component which is extracting the 3 columns - A, B and C and "Summarize In-DB" component where I am summing up A and B based on some dimensions .

 

Please let me know why I am receiving the error message and what can I do to correct it.

 

Thanks,

Anu

4 REPLIES 4
scottj
Alteryx Alumni (Retired)

What do you have in the SQL expression field.  Should be something like ("field1"/"Field2")/"Field1"

 

That error is usually when there is no expression.  Use the Insert Fields dropdown to fill in the correct available fields.

Scott Jones
Strategic Sales Engineer
Alteryx, Inc.
etl_anu
6 - Meteoroid

Hi Scott,

 

Thank you for your response. I am getting the error even after using the "" in the SQL Expression dialogue box for the fields. So I have "B"-"C"/"C" in the SQL Expression Box. Am I missing something in the SQL Expression box?

 

Thanks,

Anu

scottj
Alteryx Alumni (Retired)

That looks correct and works for me connecting to a SQL database and on Spark.  What DB are you connecting to?  You could also try putting the query directly into the Connect In-DB tool using the Visual Query Builder or SQL editor to see if that works.

Scott Jones
Strategic Sales Engineer
Alteryx, Inc.
etl_anu
6 - Meteoroid

Thanks, it worked.

Labels