Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Formula Error - Unknown Variable

cwoo
8 - Asteroid

Hi

 

I have a workflow that is encountering an error because of "Unknown variable" in formula. It is strange because I am able to use this "unknown variable" in a formula. What could be causing this error? 

 

Please see attached for reference.

 

Thanks.

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus

So it looks like you are doing this whilst creating an app? I think we need to understand more about the entire macro piece, and how you are configuring actions and mapping fields.

 

Ben

cwoo
8 - Asteroid

Hi Ben,

 

So I created a simple workflow that contains the basic structure of my Alteryx app. Yes, I do have parameters up front and lots of calculations afterwards. I think the issue I face is from using columns created from the Cross Tab tool. In this case, I had "Sum" and "Total Column" checked under "Method for Aggregating Values". Sometimes the newly created fields appear in the subsequent tools and sometimes they don't. Is there a reason why that happens? For example, yesterday I was able to successfully run the workflow using the a newly created field called Sum_20172 field in the filter tool. When I tried uploading it to the company gallery, I got an error message saying that Sum_20172 field doesn't exist. 

 

Thanks.

danrh
13 - Pulsar

When you upload to the gallery (even with the error occurring), does the workflow still run successfully? With Cross Tab the field names are variable based on the data, so the validation might not "see" the field name you're referencing until the workflow is run. As long as the field name will be in the data once run, the error on upload shouldn't be a problem.

 

One thing I noticed in your attached workflow is that the Cross Tab is summing, and so your resulting columns have the prefix of "Sum_". Your Filters are then looking for the original field names and are failing --- I'm not sure if this is a problem in your actual workflow or just the dummy one you uploaded. A way around this is to use a Dynamic Rename and remove the prefix "Sum_" from any fields coming in. Take a look at the attached for an example.

Labels