I have a data set where a process runs daily and records all inventory levels on that day. The process does not run on Saturdays. I need to duplicate all the entries from Friday and insert them into data set as Saturday.
What is the most efficient way to complete this?
Solved! Go to Solution.
Is each day a standalone data set where you're wanting to take the Fri 9/30 data from its standalone file, change it to 10/1, and create a separate standalone output file for 10/1? Or will you have a file with 9/29, 9/30, etc, and you're looking to add 10/1 (Saturday) onto the bottom?
The reason I'm asking is because if it's a file that you're continuing adding to, I want to be careful to not suggest something where you end up with previous Saturdays re-adding themselves to the file, since you would only be wanting the newest Saturday. But if it's a standalone file, that's much simpler
it's one continuous dataset contains every day of the month (except saturdays) and every item with inventory for every day. I need to basically fill in the holes and add missing dates to set by copying previous day's numbers
See attached. I annotated each tool to explain what it's doing. I'm late for a meeting now so I can't type it up here now (sorry) but hopefully that makes sense and let me know if you have any questions. The idea is we're generating a list of all dates, identifying any holes in your data, and then grabbing the previous day when there are holes
Edit: And the idea is that instead of just saying "if the date is Fri, then change the date to Sat and throw on the bottom" because with JUST that logic, what would happen is it works great for the first time you add the Saturday data but then the following week, you re-add it, and re-add it the following week. So what I have is where you generate a list of all dates, check against your data, and dynamically identify the holes to avoid duplicating the data
awesome, thank you!
