Hello,
I have two tables TopicsByDay and CourseDates
TopicsByDay contains the following data
TopicID | Day |
1 | Day 1 |
2 | Day 1 |
3 | Day 2 |
4 | Day 2 |
5 | Day 3 |
6 | Day 3 |
7 | Day 4 |
8 | Day 4 |
And CourseDates contains this data
CourseID | Start | End |
101 | 7/9/2021 | 7/12/2021 |
102 | 7/17/2021 | 7/20/2021 |
How can I replicate the first table with each CourseID in Alteryx?
Output (Required)
CourseID | TopicID | Day | Date |
101 | 1 | Day 1 | 7/9/2021 |
101 | 2 | Day 1 | 7/9/2021 |
101 | 3 | Day 2 | 7/10/2021 |
101 | 4 | Day 2 | 7/10/2021 |
101 | 5 | Day 3 | 7/11/2021 |
101 | 6 | Day 3 | 7/11/2021 |
101 | 7 | Day 4 | 7/12/2021 |
101 | 8 | Day 4 | 7/12/2021 |
102 | 1 | Day 1 | 7/17/2021 |
102 | 2 | Day 1 | 7/17/2021 |
102 | 3 | Day 2 | 7/18/2021 |
102 | 4 | Day 2 | 7/18/2021 |
102 | 5 | Day 3 | 7/19/2021 |
102 | 6 | Day 3 | 7/19/2021 |
102 | 7 | Day 4 | 7/20/2021 |
102 | 8 | Day 4 | 7/20/2021 |
Solved! Go to Solution.
Hi @tjamal1
Here is how you can do it:
Workflow:
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 🙂
Thank you for the solution. It helped a lot.
Have a nice day!
Happy to help 🙂