Hello everybody,
after creating a new column Norm_Value I want apply formula to calculate relative values based on the position of "1" in the Base_value_norm column:
dt << New Column( "Norm_Value",
Numeric,
"Continuous",
formula(
Eval(
Eval Expr(
dt:Value[(:SerialNumber << get data table) << get rows where(
dt:Base_value_norm == 1 & dt:SerialNumber == Expr( dt:SerialNumber[Row()] )
)] / dt:Value
)
)
)
);
The problem is when I try to execute script I get the following error:
Invalid row number when accessing or evaluating "dt::SerialNumber[ /*###*/Row()]" , dt :: SerialNumber[/*###*/Row()].
But If I provide the formula manually after column is created it works as desired. What can be the reason why it is not working in script? I need to do that in script since several new columns need to be created in such a way. The data table with saved formula is attached.
Thank you and best regards