cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-420466%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EF%C3%B3rmula%20de%20columna%20(selecci%C3%B3n%20de%20rango)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-420466%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ETengo%20una%20columna%20de%20datos%20secuenciada%20en%20el%20tiempo%2C%20el%20resultado%20m%C3%A1s%20reciente%20en%20la%20parte%20superior%20de%20la%20tabla.%20Quiero%20que%20se%20eval%C3%BAe%20el%20valor%20de%20la%20fila%20superior%20de%20una%20nueva%20columna%20(M%C3%A1ximo%20menos%20el%20M%C3%ADnimo)%20en%20ese%20momento%20m%C3%A1s%20reciente%20y%20un%20n%C3%BAmero%20fijo%20de%20valores%20de%20avance%20(digamos%20los%2014%20anteriores).%3C%2FP%3E%3CP%3EPor%20tanto%2C%20cada%20nuevo%20valor%20en%20cada%20momento%20ser%C3%A1%20la%20variaci%C3%B3n%20de%20pico%20a%20pico%20de%2015%20resultados%3B%20los%2014%20anteriores%20resultan%20en%20el%20momento%20actual.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESi%20estuviera%20en%20Excel%2C%20podr%C3%ADa%20arrastrar%20el%20mouse%20para%20seleccionar%20un%20rango%20de%20celdas%20para%20evaluar%20la%20diferencia%20de%20Min%20y%20Max%20en%20el%20rango%20...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-420466%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3ETabla%20de%20datos%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
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