Hi,
Greetings !
I would like to know whether there is tools / formula to create a new column title/header, if it cannot be found before.
The reason is : final output require the show all column title.
Below is the example ( assume the table from client ) :
Employee Name | Monthly Salary | Wagetype | Amount |
Angeline | 4349.17 | House Allowance | 300 |
Bruce | 7722.43 | House Allowance | 300 |
Charlotte | 10483.33 | House Allowance | 300 |
Dallot | 7558.69 | WFH Allowance | 100 |
Eugene | 10483.33 | WFH Allowance | 100 |
Friore | 14016.9 | WFH Allowance | 100 |
Glaze | 14016.9 | WFH Allowance | 100 |
Heather | 4158.33 | WFH Allowance | 100 |
Angeline | 4349.17 | Lunch Allowance | 50 |
Bruce | 7722.43 | Lunch Allowance | 50 |
Charlotte | 10483.33 | Dental Reimbursement | 51 |
Charlotte | 10483.33 | Dental Reimbursement | 71 |
Dallot | 7558.69 | Dental Reimbursement | 43 |
Eugene | 10483.33 | Dental Reimbursement | 56 |
Currently, i only use 'Cross Tab' and 'Formula' tools to get below result :
Employee Name | Monthly Salary | Dental_Reimbursement | House_Allowance | Lunch_Allowance | WFH_Allowance | Annual Bonus | Phone Allowance |
Charlotte | 10483.33 | 122 | 300 | 0 | 0 | ||
Friore | 14016.9 | 100 | 0 | 0 | |||
Bruce | 7722.43 | 300 | 50 | 0 | 0 | ||
Eugene | 10483.33 | 56 | 100 | 0 | 0 | ||
Heather | 4158.33 | 100 | 0 | 0 | |||
Dallot | 7558.69 | 43 | 100 | 0 | 0 | ||
Glaze | 14016.9 | 100 | 0 | 0 | |||
Angeline | 4349.17 | 300 | 50 | 0 | 0 |
The issue : there is possibility that the input file contain amount for 'Phone Allowance' and 'Annual bonus'.
In that case, I do not want the formula tools to create 'Phone Allowance' and 'Annual bonus'.
Thanks in advance !
Hi fikrizahari,
There is already a macro to add missing columns, it was developed 10 years ago, and here is its documentation: Alteryx: Ensuring fields are in a data stream ; now when
I tried to implement it in your workflow, I did not need it 😳 but it could be I missunderstood your question, anyhow, this is workflow screenshot:
This is how I introduced the Annual Bonus and Phone Allowance columns:
..
This is the workflow supporting these new columns, no need to impelement the macro
HTH
Arnaldo