Hi Community,
I have two datasets which I created a sample of in the attached file.
Input 1 - Contains people and their anniversary month.
Input 2 - Contains the total hours worked per month for all months possible data is available for. The "End Period Date" column is a string value (e.g January_2021).
What I'm trying to do:
- Based on the persons anniversary month, I'm trying to merge the data sets to only provide data from input 2 if it falls within their anniversary month based on YTD data.
- Since we're in 2023 and Charles's anniversary month is May, I would need data from May 2022 - April 2023. Everything else for Charles is irrelevant. In 2024, the same workflow will pull May 2023 - April 2024
- For Joan, her anniversary month is June so I would need June 2022 - May 2023 data. Everything else is irrelevant until we run it again next year.
- For Henry, his anniversary month is January so I would need January 2022 - December 2023.
In the 'Input 2' tab, I've highlighted all the relevant dates. "Expected Output" tab contains what I am trying to accomplish. How would you do this?