Hi all,
I am trying to create a new column with formula, which represented by 2 variables as below:
dt << New Column("myNewColumn", Numeric, Continuous, Formula(:Ceiling( XXColumn / Size) * Size));
where:
XXColumn is one of column name in dt, selected in column dialog
Size = numeric value from column dialog
My attempt resulted a new column with formula with no value as formula create as below:
Ceiling(Column(XXColumn ) / Size) * Size
without actually assign it.
Any idea how I can accomplish this?
finally the magic happened !!!
here is the code i used..
col = dts << New Column("Binning", Numeric, Continuous);
Eval( Parse( Eval Insert( "col << Set Formula(:Ceiling( ^n_Bin^ / ^BinSize^) * ^BinSize^)<< eval formula" )) );
Thank You MS for the guidance; what is the diff on f_bin and n_bin i used?
As far as I could tell from reading your code f_Bin refers to a column whereas n_Bin is a string, which is the data type that is safest to use here.
Thank you again, MS. I shall take note on this.