JMP - Column that generates unique row numbers by comparing between existing rows?

Reply
Occasional Contributor
Posts: 8

JMP - Column that generates unique row numbers by comparing between existing rows?

Greetings,

 

If I have the following sample data:

 

ID 1  Date 1

ID 1  Date 2

ID 1  Date 3

ID 2  Date 4

ID 2  Date 5

ID 2  Date 6

ID 2  Date 7

ID 3  Date 8

ID 3  Date 9

ID 3  Date 10

ID 3  Date 11

ID 3  Date 12

 

For a given row (aka unique ID and Date pair), how to create a new column to indicate this row is Date number X (of Y rows for each unique ID)?

 

ID 1  Date 1   1

ID 1  Date 2   2

ID 1  Date 3   3

ID 2  Date 4   1

ID 2  Date 5   2

ID 2  Date 6   3

ID 2  Date 7   4

ID 3  Date 8   1

ID 3  Date 9   2

ID 3  Date 10   3

ID 3  Date 11   4

ID 3  Date 12   5

 

For this small sample set, I can easily do manually. However, I do not know how to write a script using available JMP/jsl functions to compared between rows to do this for a large data set.

 

Thank you.

 

Super User
Posts: 19,051

Re: JMP - Column that generates unique row numbers by comparing between existing rows?

This is a SAS forum, I think you want a JMP specific forum : https://community.jmp.com/community/discussions
Ask a Question
Discussion stats
  • 1 reply
  • 241 views
  • 0 likes
  • 2 in conversation