cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

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

Row difference (moving range)

Hello,

 


Can you help how to write a formula for row difference? My problem with the formula is that I have a variable column "Partnumber" and I don't want the row difference calculated if the next row has a different partnumber than the current row. Please find a sample table. In row number 30, the part number is different than the previous row. For row 30, I don't want the calculation but then continue as long as the next rows
 have the same part number as row 30 and so on.

2 REPLIES 2
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Row difference (moving range)

I think an if statement will do what you want, see the column formula below.  This will return zero for row 30, you might prefer a missing value.

 

If( :Epi_Product_Number == Lag( :Epi_Product_Number, 1 ),
	Dif( :"Mean(Average)"n ),
	0
)
Sebnem
Level II

Re: Row difference (moving range)

thank you very much. It worked very well.

Recommended Articles