cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
VT23
Level I

New Column to show repeated values in for each run/ID across two data types

I tried using lag function to indicate when the first test for a sample ID based on time column. Need to the column, Order Tested, to represent first test conducted for a sample ID and second test based on time. Each test will have a real and maybe a code value. See attached file for JMP file. At the end of the day Order Tested column needs to look like image below. This is just a sample, real one has 10,000+ data points.

 

VT23_0-1710526580201.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: New Column to show repeated values in for each run/ID across two data types

You can use Col Cumulative Sum with if statement

Col Cumulative Sum(If(Row() == Col Min(Row(), :Sample ID, :Time, :DataType), 1, .), :Sample ID, :DataType)

jthi_0-1710528913353.png

KudosAdd dense ranking to Ranking Tie and Col Rank functions to make this much much easier

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: New Column to show repeated values in for each run/ID across two data types

You can use Col Cumulative Sum with if statement

Col Cumulative Sum(If(Row() == Col Min(Row(), :Sample ID, :Time, :DataType), 1, .), :Sample ID, :DataType)

jthi_0-1710528913353.png

KudosAdd dense ranking to Ranking Tie and Col Rank functions to make this much much easier

-Jarmo
VT23
Level I

Re: New Column to show repeated values in for each run/ID across two data types

Thanks for the solution!