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

Crosstab and Dynamically name Columns

LincolnMike
8 - Asteroid

Hi again, 

I need my output to split out Yes and No Flag counts by Country.  I built a Crosstab workflow (attached), but I would like the country to be appended to the Y or N flag, per the following image.  At times there will be over 100 questions, but only 6 countries, and 6 veh.

Your help is appreciated.

output.JPG

 

5 REPLIES 5
LordNeilLord
15 - Aurora

Hey @LincolnMike,

 

The easiest way to do this is create a formula which concatenates your country and Y/N flag, this can the be used as your header:

 

Country Headers.PNG

 

 

LincolnMike
8 - Asteroid

Thank you LNL.  Is there a way to sort so TotN and TotY would list before the other countries?

LordNeilLord
15 - Aurora

@LincolnMike,

 

Absolutely... a couple of ways would be to use a select tool just before the output and manually move the totals to the where you want them. Or if you want it be more dynamic then add an "a" to the total header (which will then sort it first in the crosstab) and use Dynamic Rename (or Multifield) to remove that "a" after the crosstab

 

Country Headers Dynamic.PNG

LincolnMike
8 - Asteroid

Hi LNL, thanks for the solution.  One last question on this same query:

Is there a way to dynamically Data Cleanse?  As countries get added,  I would need to manually check their boxes in the Data Cleanse tool.

LordNeilLord
15 - Aurora
I think Multifield would be the tool here with something like:

If IsNull([_currentfield_]) then 0 else [_currentfield_] endif

On all numeric fields
Labels