turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Sequence Field repeated based on FIRST.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Aug 4, 2010 10:26 AM
(851 views)

How could I create a sequence that restarts when it gets to a new level of another field.

What I want is something like this. How can I calculate the SNO field?

VAR1 VAR2 SNO

A A 1

A A 2

A A 3

A B 1

A B 2

B A 1

B A 2

B A 3

B A 4

B B 1

B B 2

B B 3

What I want is something like this. How can I calculate the SNO field?

VAR1 VAR2 SNO

A A 1

A A 2

A A 3

A B 1

A B 2

B A 1

B A 2

B A 3

B A 4

B B 1

B B 2

B B 3

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Aug 4, 2010 1:15 PM
(821 views)

Try using this script as a formula for the SNO column:

If( Row() == 1,

1,

If( :VAR1 == :VAR1[Row() - 1] &

:VAR2 == :VAR2[Row() - 1],

:SNO[Row() - 1] + 1,

1

)

)

If( Row() == 1,

1,

If( :VAR1 == :VAR1[Row() - 1] &

:VAR2 == :VAR2[Row() - 1],

:SNO[Row() - 1] + 1,

1

)

)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Aug 4, 2010 2:02 PM
(821 views)

Thanks!