Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Maintain Column Sequence with Additional New Columns

fikrizahari
8 - Asteroid

Hi,

Greetings !

I have dummy input template which shown the number of new and resigned staff for this year.

DepartmentJanFebMarAprJan (-)Feb (-)Mar (-)Apr (-)
Finance40411001
IT10110000
HR21000101
Legal12002000


I require to add new 'total' columns for each group and 'differences' column, so the output should be as below :

DepartmentJanFebMarAprTotal New StaffJan (-)Feb (-)Mar (-)Apr (-)Total Resigned StaffDifferences
Finance40419100127
IT10113000003
HR21003002130
Legal12003200021



Currently i only used Formula tool to calculate and Select tool to reorder the sequence.
However, the issue come in after the next month being added, for example May, the result will be as below ( which is wrong order ) :

DepartmentJanFebMarAprTotal New StaffJan (-)Feb (-)Mar (-)Apr (-)Total Resigned StaffDifferencesMayMay (-)
Finance40411010012810
IT1011300000300
HR2100500213220
Legal1200320002100



I think the issue come from Select tool since May is new column added in the input file
Please advice is that possible to create fixed columns sequence.

Thank you in advance !

1 REPLY 1
FrederikE
13 - Pulsar

Hey @fikrizahari,

 

Prop. ot the most elegant way, but it works: 

FrederikE_0-1683700318208.png

 

Labels
Top Solution Authors