Hello,
I need your help to devide columns by a variable from another table
dt is a big table with a lot of columns
dt2 has 2 columns "Names" (contains column names from dt) and "DivideValue" ( could be 10, 100, 10000,...)
I want to divide dt columns by the dt2 Dividevalue IF dt column nane = dt2 Names.
I could create a new column with formula, then remove property and delete "old column", but I guess we could apply a formula to the curent columns ?
I found that we can apply a custom format like below : A/10
Column( "A" ) << set Format( "Custom", Formula( (value/10)) ), 5, 0 );
But in the for loop I cannot make it working.
colnamedt = {};
N = N Col(dt);
R = N Row(dt2);
For(k = 1, k <= N, k++,
colnamedt = Column( dt,k ) << getname();
for (i=1, i <= R, i++,
if (( dt2:Names[i]==colname),
Column( dt,k ) << set Format( "Custom", Formula( (value/dt2:DivideValue[i]) ), 5, 0 );
););
);
Thanks
Geof
@martindemel