Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Replicate Data based on Dates

tjamal1
8 - Asteroid

Hello, 

 

I have two tables TopicsByDay and CourseDates

 

TopicsByDay contains the following data 

TopicIDDay 
1Day 1
2Day 1
3Day 2
4Day 2
5Day 3
6Day 3
7Day 4
8Day 4

 

And CourseDates contains this data

CourseIDStart End
1017/9/20217/12/2021
1027/17/20217/20/2021

 

 

How can I replicate the first table with each CourseID in Alteryx?

 

Output (Required)

CourseIDTopicIDDay Date
1011Day 17/9/2021
1012Day 17/9/2021
1013Day 27/10/2021
1014Day 27/10/2021
1015Day 37/11/2021
1016Day 37/11/2021
1017Day 47/12/2021
1018Day 47/12/2021
1021Day 17/17/2021
1022Day 17/17/2021
1023Day 27/18/2021
1024Day 27/18/2021
1025Day 37/19/2021
1026Day 37/19/2021
1027Day 47/20/2021
1028Day 47/20/2021

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @tjamal1 

 

Here is how you can do it:

 

Workflow:

atcodedog05_0-1625848639743.png

 

1. Using formula tool to convert to alteryx supporterd dates. Skip this step if dates are already in format.

2. Using generate rows generating days between start and end date.

3. Using formula tool Calculating day of course by taking  diff of start and current date.

4. Using join tool joining based on day.

5. (Optional) change date format if required

 

Hope this helps 🙂

tjamal1
8 - Asteroid

Thank you for the solution. It helped a lot. 

Have a nice day!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂

Labels