thanks @iCFO . I haven’t incorporated the “week grouping”, but I’m guessing that is where you ended up heading on the other thread. I thought I’d uploaded this though. Perhaps the week groups can be incorporated back in relatively easily? I may be returning the favour and asking you for your assistance on working that back in here…
@Gabriel2020 , please take a look at the attached. I decided to ditch the java snippet that I posted before and instead make use of the alternative which uses components (which contain java snippets) to do the job. This way, I could then more easily add the refinements. The grouping of source and dest is performed by a group loop which increases run time but simplifies finding the groups, and allows the existing nodes to be used. I then added the piece on the end which “adds back” the values from the rows with no “next day” for that group, onto the final “good” day for the group.
Cumulative Calc Shipping.knwf (131.2 KB)