cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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