Hi,
if it is a simple moving average, you can easily compute it by using the Lag() function in Formula Editor.
Here below an example on how to calculate the moving average of previous 3 rows for Dissolution column in Tablet Production sample data table:
// Open Data Table: Tablet Production.jmp
// → Data Table( "Tablet Production" )
Open( "$SAMPLE_DATA/Tablet Production.jmp" );
// New column: Dissolution_MA3
Data Table( "Tablet Production" ) << New Column( "Dissolution_MA3",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
(Lag( :Dissolution, 1 ) + Lag( :Dissolution, 2 ) + Lag( :Dissolution, 3 ))
/ 3
)
);
// Report snapshot: Tablet Production - Graph Builder
Data Table( "Tablet Production" ) << Graph Builder(
Size( 799, 452 ),
Show Control Panel( 0 ),
Variables( Y( :Dissolution ), Y( :Dissolution_MA3, Position( 1 ) ) ),
Elements( Line( Y( 1 ), Y( 2 ), Legend( 6 ), Row order( 1 ) ) )
);
Cheers, Massimo