I'm very new to jmp, trying to move from spreadsheets for big datasets. I'm trying to create a series of columns to calculate different moving averages for a data column (xV-C). I have most of the code working to create the columns, but the formula for each created column uses the for-loop variable (j) instead of the value for the for-loop (10, 11, 12...) for each column. I think I need to do something with Eval and Parse, but I can't figure it out. This is what I have so far:
For(j = 10, j <= 12, j++,
New Column("xF-C MA " || Char(j), Numeric, Formula(Col Moving Average(:"xV-C"n, 1, j - 1)))
);
I'm sure this is an easy one for someone! I appreciate the help!