A complete newbie here,
could not find the solution in older posts,
I have created a variable containing an existing column name. I want to create a new column, were the data from two other columns is summed (calling the columns by variables). the usage of variable is for later use in a for loop.
Thanks for helping!
for the below code:
dt = Current Data Table();
columnname1 = Column( dt, 1 ) << Get Name;
columnname2 = Column( dt, 2 ) << Get Name;
dt << New Column( "new_" || columnname1, Numeric , continuous, formula(column(dt, columnname1)+column(dt, columnname2)));
I get the following error:
Column new_Column 1 2 Formula Interrupted
Cannot convert argument to a number [or matrix] 1 times At rows: 2 Operation: Add, Column( dt, columnname1 ) + /*###*/Column( dt, columnname2 ) /*###*/
Formula evaluation errors have been ignored
Column( "new_Column 1 2" )