I need to generate an ID based store and reset anytime the transaction type = 200. Below is an example for my data.
StoreID TransactionID
A 200
A 300
A 45
A 1
A 200
A 23
A 2000
A 200
A 1
Now, I need this to be populated. Row number that resets everytime the 200 is shown. One transaction can have multiple ids and also different numbers of transactions in between. However 200 is BeginingOftransaction so I need to to be able to get an ID and reset on the 200.
Rn StoreID TransactionID
1 A 200
2 A 300
3 A 45
4 A 1
1 A 200
2 A 23
3 A 2000
1 A 200
2 A 1