Hello
I want to create a new column called "Key".
For each customer there will be unique value from row with ind=1 until one row before the next ind=1.
What is the way to do it please?
Data have;
Input CustomerID Ind amount;
cards;
111 1 5000
111 0 200
111 0 210
111 0 205
111 0 208
111 1 8000
111 0 71
111 0 72
111 0 75
111 1 20000
222 1 7000
222 0 400
222 0 412
222 1 10000
222 0 101
222 0 99
222 0 102
;
Run;
Wanted data set
