cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • We’re improving the Learn JMP page, and want your feedback! Take the survey
Choose Language Hide Translation Bar

How to get new column to populate cycles in large data set for multiple cycles on the same sample?

Hello, 

 

I have some very large data sets (>1million rows) of numerous samples that have been tested in a cyclical fashion. The same sample has gone through 100's of cycles and I'm hoping to find a way to quickly add the cycles to my data table. 

 

The test starts at zero displacement and then runs to a peak force (varies depending on which cycle it is) and then returns back to a zero/near-zero value. I'd like a way to add in the cycle without having to manually scroll through millions of rows of data adding cycles. 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to get new column to populate cycles in large data set for multiple cycles on the same sample?

I added this formula to the Cycles column.  It increments the Cycle number each time it detects a change from decreasing values, to increasing values.

As Constant( x = 1 );
If( :Sample != Lag( :Sample ),
	x = 1
);
If( Lag( :Compression ) > :Compression & Lag( :Compression, -1 ) > :Compression,
	x = x + 1
);
x;

Below is a graph where I have created a local data filter, which is set to only display cycles 3,4 and 5 from sample 3.  I believe this is what you are looking for

txnelson_1-1747101042039.png

 

 

Jim

View solution in original post

4 REPLIES 4
jthi
Super User

Re: How to get new column to populate cycles in large data set for multiple cycles on the same sample?

In your data it seems like you could just use Sample to determine the cycle?

-Jarmo

Re: How to get new column to populate cycles in large data set for multiple cycles on the same sample?

Hello, 

Each sample has numerous cycles of compression/decompression in them (100's) and I'm hoping to find a way to break down each Sample # into each cycle within that sample. 

txnelson
Super User

Re: How to get new column to populate cycles in large data set for multiple cycles on the same sample?

I added this formula to the Cycles column.  It increments the Cycle number each time it detects a change from decreasing values, to increasing values.

As Constant( x = 1 );
If( :Sample != Lag( :Sample ),
	x = 1
);
If( Lag( :Compression ) > :Compression & Lag( :Compression, -1 ) > :Compression,
	x = x + 1
);
x;

Below is a graph where I have created a local data filter, which is set to only display cycles 3,4 and 5 from sample 3.  I believe this is what you are looking for

txnelson_1-1747101042039.png

 

 

Jim

Re: How to get new column to populate cycles in large data set for multiple cycles on the same sample?

Thank you so much Jim!

Recommended Articles