Start Free Trial

Alteryx Designer Desktop Discussions

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

Creating a list of reoccurring dates using the generate rows tool.

tkh
5 - Atom

I think i figured this out for now - I used a formula tool to with 

DateTimeAdd([StartDate],4,"years")

To get my last date to generate a row for.

Then in the generate rows tool I used 

init: [StartDate]

condition: [StartDate] <= [LastStartDate]

Loop exp: DateTimeAdd([StartDate],[cycle],"months")

 

After that I used a formula tool with DateTimeAdd() to add the duration in days to the StartDate to generate the EndDate

---------------------------------------------------------------------------

 

I have a request that I think can be done with the Generate Rows Tool.

 

This will be in two parts. 

 

The first part is working with a table of locations and their schedules for a certain event. 

Starting month - first month this will start. 

Duration - How long the event lasts

Cycle - Number of months in between cycle. For example, 12 = annually, 18 = every 18 months, 24 = every two years etc.

 

With this, I want to generate an output that will list the start and end dates for the next x years. I want this to be dynamic so this will be something like currentYear + 4 years to get a 5 year view of the future.

 

I started working with the Generate Rows Tool but figured I'd ask while I work in case someone already knows how to recreate this.

 

Input table:

LocationStarting MonthDurationCycle
Loc110312
Loc26518
Loc324.524

 

Output table:

ss1.PNG

 

Side note: feel free to edit the input month to be a specific date (10 = 10/1/2021). I'm using a formula to convert this.

1 REPLY 1
Sebastiaandb
12 - Quasar

Hi @tkh ,

 

Here you go!

 

You can fill in the amount of years from now in the macro.

 

Sebastiaandb_0-1639559286844.png

 

Let me know if this is what you're looking for :-).

 

Greetings,

 

Seb

Labels
Top Solution Authors