Removing negative dates and/or splitting date periods
Hi all! :sunny:
Maybe one of you has a smarter way to manipulate dates for the desired result. On the left, I have raw data which contains start and end dates. However, some rows have negative values in the Units column, which means that the mentioned date has to be deleted from the same Name and the date period has to be adjusted. On the right is an example of how the data should look.
I was thinking of splitting the periods to create dates in between, and later sorting out negative values, changing them to positive, concatenating tables, and removing duplicates. But if there’s a smarter way to do this, please help me out! If not, I’d appreciate help with splitting periods and creating dates in between.
Please keep in mind that Name, start and end dates, and unit quantity can vary significantly each time.
Thank you a lot!