Im trying to remame the columns in the table below with ascending integers. The dates will change week on week, so I need a way to dynamically rename in alteryx, is there a way of doing this with the dynamic rename tool? or another method perhaps?
To be turned into:
| Week Start | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Week | 46 | 47 | 47 | 48 | 49 |
Thanks
1 Answer
You'll need to use a combination of the Transform tools and a Record ID. Use the Transpose tool with the 'Week Start' as your "Key column" then use the Summarize and group by the new Name field to get a list of all your dates and sort the dates in ascending order.
Add a Record ID after to give each date an ID. Join this back to the original Transpose and then Cross Tab to get the output you want.
See screenshot in link below.
1
