cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

lag function

ParametricStudy
Level II

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