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

lag function

Hello

having issue implementing formula/script using lag function that will help populate a new column where original column has some missing data. so if rows 1-5 have x value and missing readings from 6-10 and a change in row 11 so rows 6-10 would be that x val

 

 

3 REPLIES 3
txnelson
Super User

Re: lag function

If I am correctly interpreting what you want, Given a data table

txnelson_0-1689878087478.png

The following formula will fill in the values in a new column as I believe you want them

If( Is Missing( :X ),
	Lag( :Y ),
	:X
)

txnelson_1-1689878204694.png

 

Jim

Re: lag function

Yes! 

jthi
Super User

Re: lag function

Besides using Lag() if your data is fairly simple and you want to only fill missing values by repeating earlier value, JMP does provide interactive option "Replace Missing with Previous Value"

jthi_0-1689878410995.png

 

-Jarmo

Recommended Articles