BookmarkSubscribe
Choose Language Hide Translation Bar
Sibtid
Community Trekker

Create repeat sequence by group

Hi,

I have data as below, I would like to create sequence as "Expected result".

I also attach file.

Thanks in advance.

 

2019-05-23 16_56_42-Subset of test 38 - JMP.png

0 Kudos
2 REPLIES 2
txnelson
Super User

Re: Create repeat sequence by group

Here is a formula that will do that

If( Row() == 1, seq = 0 );
If( Lag( :Group ) != :Group,
	seq = 0
);
If( :Run == 1, seq = seq + 1 );
seq;
Jim
0 Kudos
Sibtid
Community Trekker

Re: Create repeat sequence by group

Thank you so much txnelson for formula.

 

2019-05-24 11_06_46-Sample data - JMP.png

0 Kudos