Hey there!
I have a script which is creating summary columns from a data table. It's collecting the Max and Initial values from certain columns. I'd like to create a new column calculating the difference between Max and Initial. I have 18 different measurements which need this, so I'd like to automate this. I have a script to create and name the columns appropriately. All set there.
What I need help with is how to add the Formulas to said Difference columns. The issue is I don't know how to run multiple evaluations within one Eval function.
What I currently have is below. I was also thinking about creating the columns and then going back to add the formula, but that seems to run into the same issue.
//I have a List T_List with all the measurement names<BR /><BR />For(i = 1, i <= 18, i++,
Eval(
Substitute(
Expr( New Column(T_List[i] || " Temperature Difference", Numeric, Continuous, Format("Fixed Dec", 2)
Formula( Column(i) + Column(i+18) ) // Always adding 2 columns that are 17 columns apart, but unclear how to specify those columns with multiple evaluations
),
Expr( _name_ ), parse(":" || T_List[i])
)
)
);
);