For each row in the below example data set, the code does a sum of the previous 5 rows when a certain condition is met. The problem I\'m having is the condition needs to ref