cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
VT23
Level II

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 II

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

Thanks for the solution!

Recommended Articles