Hi folks,
After getting some seriously great help earlier I have one more question to get my project over the line:
I have a small unique subset of my data left and essentially all I have left to do is generate two rows for Saturday and Sunday when the day is Friday however I can't seem to get my syntax right.
here is a dummy sample of the data below:
I just need to generate two rows which will be the Saturday and Sunday for each of these people and boom I'm over the line.
| ID | Leave_Date | Name | Leave_Type | Day_of_The_Week | Day_of_Week_Number | |
| 1 | 02/06/2023 | James | James@default.com | Annual Leave | Friday | 5 |
| 2 | 09/06/2023 | John | John@default.com | Annual Leave | Friday | 5 |
| 3 | 16/06/2023 | Leah | Leah@default.com | Annual Leave | Friday | 5 |
| 4 | 23/06/2023 | Rebecca | Rbecca@default.com | Annual Leave | Friday | 5 |
| 5 | 30/06/2023 | Tony | Tony@default.com | Annual Leave | Friday | 5 |
Solved! Go to Solution.
Hey @Deano478, you can first use the Generate Rows tool to create the 2 new rows:
Not sure if this step is necessary but you could correct the weekday of the new records with something like this:
Hi @Deano478
One way of doing this.
Step 1: Input
Step 2:
IF [Day_of_The_Week] = "Friday"
THEN 3
ELSE 1
ENDIF
Step 3:
Step 4:
IF [RowCount] = 2
THEN "Saturday"
ELSEIF [RowCount] = 3
THEN "Sunday"
ELSE [Day_of_The_Week]
ENDIF
Many thanks
Shanker V
Hi Guys, I should have provided more data here is a more accurate sample for the case you can see that tony is off for a while and theres two weekends missing how could I navigate a situation like this to get those dates in?
| Employee_Name | ID | Leave_Date | Day Of Week | Leave_Type | |
| Tony | 23 | 01/08/2023 | Monday | Study Leave | Tony@default.com |
| Tony | 23 | 02/08/2023 | Tuesday | Annual Leave | Tony@default.com |
| Tony | 23 | 03/08/2023 | Wednesday | Annual Leave | Tony@default.com |
| Tony | 23 | 04/08/2023 | Thursday | Annual Leave | Tony@default.com |
| Tony | 23 | 08/08/2023 | Tuesday | Annual Leave | Tony@default.com |
| Tony | 23 | 09/08/2023 | Wednesday | Study Leave | Tony@default.com |
| Tony | 23 | 10/08/2023 | Thursday | Study Leave | Tony@default.com |
| Tony | 23 | 11/08/2023 | Friday | Study Leave | Tony@default.com |
| Tony | 23 | 14/08/2023 | Monday | Study Leave | Tony@default.com |
| Tony | 23 | 15/08/2023 | Tuesday | Study Leave | Tony@default.com |
| Tony | 23 | 16/08/2023 | Wednesday | Study Leave | Tony@default.com |
| Tony | 23 | 17/08/2023 | Thursday | Study Leave | Tony@default.com |
| Tony | 23 | 18/08/2023 | Friday | Study Leave | Tony@default.com |
@Deano478 how does this look? If the day is a Friday we just look for the Sunday date and generate rows until then, then re-format dates/day of the week as necessary:
@DataNath That's absolutely perfect I genuinely could never have figured that out myself so I'm gonna go through your solution in depth to see exactly what you did so if it comes up again I know what to do
Great to hear @Deano478 - if you want the steps explaining then let me know, happy to break it down! Understand if you want to flick through and figure it out yourself though :)

