cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Due to global connectivity issues impacting AWS Services, users may experience unexpected errors while attempting to authorize JMP. Please try again later or contact support@jmp.com to be notified once all issues are resolved.

Discussions

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

Add values to x# of lag rows

I want to fill the previous 48 rows with the value of row i. I've got a dataset that is a continuous timeseries with a row for every 5 min increment of time. I have an identification column for select periods (e.g. ID#1, 2, 3, ... 1000). Not every row gets an identifier, just select periods of time. Now say row 1200 is the first value of ID # 250. I want the previous 48 rows (so rows 1152-1199), currently emply, to also be filled in with the value "250". Anyone know a formula that will do this? I was thinking of some sort of index but not sure how do do it. There is a very clunky way of scripting this that I am trying to avoid... basically just an insanely long formula of If-Then statements but to do that 48 times is a bit silly. I'm looking for some way of using a simple formula .. Row i - Lag-row,48, fill with ID from row i. 

Hope that makes sense, let me know if you need more info or clarification 

1 REPLY 1
txnelson
Super User

Re: Add values to x# of lag rows

This Discussion Item was reworded and solved here. 

Jim

Recommended Articles