Hello,
I have a workflow and data set is currently looking like this

I would like to have column prt_7d_used_count for each prt_7d_used_flag=1 summing the previous rows within the same parent_part. Final data set should look like this

Other solution would be to to fill down 0 with 1 where wrong_flag=1 within the same parent_part