Alteryx Designer Desktop Discussions

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

Generate dates from multiple input rows as source

Alteregoryx
6 - Meteoroid

I am trying to generate rows in a multi-row-formula kind of logic.

 

Following the attached data sample, each variable is denoted by a name, x1 to x8 (total of eight variables). Next to it is the dates determining a time-window of availability. These dates are shown pair-wise, which means that no variable has an uneven number of dates associated. The first date of each pair marks the start of availability, while the second date marks the end of availability. 

 

I want to convert it into rows of each time-window of availability for each variable, starting from start date and ending at end date, generating rows of all dates in between, as shown in sample data. 

 

Thank you in advance for your help!

 

In addition to sample data, a small mock-up of the same:

 

Data as is:

VariableDates
x11/30/2019
x12/1/2019
x12/1/2019
x12/3/2019
x12/3/2019
x12/6/2019

 

Data to be:

VariableAll dates
x11/30/2019
x11/31/2019
x12/1/2019
x12/2/2019
x12/3/2019
x12/4/2019
x12/5/2019
x12/6/2019
1 REPLY 1
Alteregoryx
6 - Meteoroid

Solved!

 

1) Add record ids

2) Do a multi-row tool, and leverage record IDs + pair-wise logic, in order to number each pair

3) Do a batch-macro that takes each pair, find min and max date, and generate rows for dates in between

4) Take the output of the macro and add a union tool to variable ID and the new dates

 

 

Labels