How to calculate interrupted datasets?

Hard to be very specific with just the screenshots. See the FAQ: How to do a minimal reproducible example reprex for beginners. It looks like you want to create a column that contains the first series as is, and continues with cumsum lagging by 1 period.

1 Like