cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • 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!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

Column Formula (Range Selection)

I have a column of data sequenced in time, most recent result at the top of the table. I want the top row value of a new column to be evaluated (Maximum minus the Minimum) at that most recent time  and a fixed # proceeding values (say the previous 14).

So each new value at each time will be the peak-to-peak variation of 15 results; the previous 14 results the one at the current time.

 

If was in Excel I could drag the mouse to select a range of cells to evaluate the difference of Min&Max over the range...

1 REPLY 1
txnelson
Super User

Re: Column Formula (Range Selection)

If I am correctly interpreting your question, here is one possible way to handle it as a formula for a new column

If( Row() <= 14,
	bottom = 1,
	bottom = Row() - 14
);
Max( :weight[Index( bottom, Row() )] ) - Min( :weight[Index( bottom, Row() )] );
Jim

Recommended Articles