We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula to Generate New Columns

fitzviz
7 - Meteor

I am starting with the attached data where I have a unique ID and a start date.

 

I would like to create a formula that creates for each unique ID, 1000 new columns called Wk1, Wk2, Wk3...... Wk1000.

 

Subject IDStartWk1 Wk2Wk3Wk4Wk......Wk1000
1DateStart+(7 daysStart + 14daysStart+21daysstart+28daysetcetc
2Date      

 

 

Wk1 is equal to Start Date +7 days, Wk2 = Start Date + 14 days etc until Wk1000 = Start Date + (7*1000) days

 

Does anyone have a recommendation on the best way to do this in Alteryx?

 

Thanks in Advance!

2 REPLIES 2
bbak91
Alteryx
Alteryx

Generate Rows, then a couple of formulas, and finally a crosstab should do the trick! Picture below and workflow is attached. 

 

Week add.png

bbak91
Alteryx
Alteryx

If you also need the "Subject ID" or "Record ID", you can go to the crosstab tool and also check it in the group by section. 

Labels
Top Solution Authors