Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAMy solution.
Did not match the expected output, same as my friends.
ReviewDate | PrepDate1 | PrepDate2 |
2025-10-03 | 2025-10-01 | 2025-10-02 |
2025-10-08 | 2025-10-06 | 2025-10-07 |
2025-10-16 | 2025-10-14 | 2025-10-15 |
2025-10-17 | 2025-10-15 | 2025-10-16 |
2025-10-25 | 2025-10-22 | 2025-10-23 |
... |
I solved this in two different ways:
For option 2, the first PrepDate I got goes back to May 2024 and therefore we would need a 2024 holiday schedule. Anyway, seems silly to be reviewing an assignment with review date of October 2025 in May 2024 so maybe I misunderstood the question.
My solutuion.
My approach is to create the calender that has previous working days and then join those data. So, the result is not the same.
@Qiu Just checked out your response to that question and the only difference I can see is when you sort after the output of the first Join. It is Review Date ascending and Row Count ascending, you then sample top 2. I think it needs to sample bottom to if you sort that way, or if you want Top 2 it would need to be Row Count Descending. Really fun challenge though!
A nice challenge with lots of fun tools to use.
So I interpreted the challenge as follows: Create a schedule that allows you to prepare for the reviews on time. You'll need two days to prepare, and you cannot prepare multiple reviews on the same days. Therefor you must create a schedule that allots two workable preparation days for each planned review.
So have a look at what I built:
Of note: my solution does not take into account that the preparation dates are before the scheduled review date, but I did not fix this problem because the overall preparation schedule is ONE YEAR BEHIND approximately😆