Hi,
I have a workflow where my input looks like this
Name | 2021-05-11 | Age9_44 | 2021-05-12 | Age9_45 | 2021-05-13 | Age |
Sam | 12000 | 1 | 13000 | 2 | ||
Huge | 44000 | 60 | 34000 | 1 |
I want my data as below for my further expressions :
Name | 2021-05-11 | Age9_44 | 2021-05-12 | Age9_45 | 2021-05-13 | Age9_46 |
Sam | 12000 | 1 | 13000 | 2 | ||
Huge | 44000 | 60 | 34000 | 1 |
The Age column keep adding on so tomorrow it will, be Age.i want alteryx to check the previous Age column header and add a digit to it.
Is this possible?
The short is SURE! Can you explain though how the data is coming in/being updated. Is it a new file where the column i always called "age"?
Ideally it's probably easiest to transpose it and then perhaps use a multi-row or something to look for the row two rows above it (assuming that that is where the previous age is).
then you do something like
left([row-2:name],length(row-2:name]-1)+tostring(tonumber(right([row-2:name]),1))+1)
or something like that.
@apathetichell yes so everytime the data comes in as an input theres a new age column header with the recent date. I just want to modify the age column header to Age + (Prev age column+1) so Age9_46
Could you share a workflow.. As I'm not able to get this to work.
With CROSSTAB, the output columns appear in sorted order and you will have to shuffle them back using a SELECT tool.
A more robust way of doing this would be using FIELD INFO and DYNAMIC RENAME.
Have attached a workflow for your reference.
Regards,
Shreyansh Rathod