Alteryx Designer Desktop Discussions

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

Creating field if it doesn't exist (Cross Tab Tool)

lindsey
5 - Atom

In a few workflows we have, we need to have the same columns after we perform crosstabs regardless of whether there were any values that matched.  So, we might have a Likert scale of 1-5, and we're trying to see the percentage of each response for multiple questions, but with a small sample size, maybe no one answered with a '4', and so the Cross Tab tool does not create that field, but the next time the workflow runs, it could be a different field that goes missing:

 

Capture.PNG

 

Is there a way to just create any of the XRow fields with null values only if they don't already exist?

1 REPLY 1
Claje
14 - Magnetar

The CReW Macros have an excellent macro called "Ensure Fields" that will let you make sure that certain names appear in your output.  That seems like a good place to look for this.

Labels