2024: Week 39 - Solution
Solution by Tom Prowse and you can down load the workflow here . Step 1 - Each Day of Engagement First, we want to ensure that there is a row for each day that a consultant is on an engagement. For this we can use the New Rows step within Prep to help pad out any missing days. Within the setup we want to add new rows between the engagement start and end dates and have an increment of 1 day: We can then remove the weekends from the list by first identifying the weekday by using the Datename function: Weekday DATENAME('weekday',[Work Day]) Then from this field we can exclude the weekends (Saturday & Sunday). Finally we can calculate the number of calendar days for each engagement: Calendar Days DATEDIFF('day',[Engagement Start Date],[Engagement End Date]) At this stage the table should look like this: Step 2 - Aggregate & Rank The final part of the challenge is to aggregate our table as per the requirements. For this we can use the aggregate step where we g