I have data where a certain number of parts are used on a component before it is replaced. At the point when the component is replaced, the part count is reset to 1. I would like to create a column that increments the component count each time the part count is reset to 1. How would I do this?
I attached a picture of the part count over time to help with understanding how the data looks.
The indicator that the component has been replaced is when the part count reverts to 1.
Is this what you needed?
It's quite simple. The steps are this:
New Column("ComponentCount", Numeric, Continuous, Formula( If(Row() == 1, 0, :PartCount == 1, Lag(:ComponentCount, 1) + 1 ) )