Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Parse Error at char (n): Unknown variable "[variable_name]" Expression (#n)

Alteryx_KB
Alteryx
Alteryx
Created

Environment Details


  • Alteryx Designer
    • All versions
  • Tools Impacted
    • Dynamic Rename
    • Filter
    • Formula
    • Multi-Row Formula


Cause


Something changed in the metadata, and the field/ column [variable_name] is no longer available, i.e.: the variable being used to create a formula is missing or has not yet been created.



Resolution


Breaking down the error message, Parse Error at char (6) tells you exactly where the issue is: it starts at the sixth character in (Expression #1). Remembering that Alteryx Designer is 0-based, start counting at zero.

 

Designer uses brackets to identify variables, therefore, in the formula [x1]+[x2], the sixth character is the x at the beginning of variable [x2] which is the variable in question. Another hint is that the text color of variable [x2] is black, indicating that it is not a recognized variable name.

 

From here, trace backwards from the erroring tool to find out where the column went “missing.” For example, [variable_name] may have been renamed in a Select tool upstream or deselected in an intermediate tool.

 

When building a formula or using functions, verify that all string values are in quotes. Ensure variable names doesn't have leading or trailing spaces, [ variable_name] or [variable_name ]. Do not use brackets in variable names. These types of errors are especially common in nested conditional statements.
 



Comments
MWeeraman
5 - Atom

round([LM Final Ending Bal]-[Beginning Bal],.1)

 

How should the above error be corrected??