Forum Discussion
schilderic
4 years agoNew Member
Create a column in Power Query that cycle counts based on the event state of another column
Event State Cycle Count Start 1 Charge 1 Discharge 1 Charge 2 Discharge ...
schilderic
4 years agoNew Member
Thanks Vijay, You've definitely moved the ball. The only thing is that were counting the number of charge and discharge (or discharge and charge) cycles. The first combination is cycle 1 the next is 2, the next is 3 and so forth. We assign the start and end state to 1 and the last cycle counted respectively. If there are other states beyond charge or discharge they would be assigned to the cycle previously counted. So in your case the second discharge would still be 2 and the Dummy State would also be 2. The End would also be 2. In this example since charge is the first after start that would be the trigger state to increment the cycle count. If discharge was first after start it would be the trigger state.