I have a list comprised of stringlist={Albert,Bert,Cathy ,Daniel,Total} that are column names in a table
I'd like to create in the same table 4 new columns, with new column names Albert Total,Bert Total,Cathy Total, Daniel Total where the formula of Albert total = Albert/Total, Bert = Bert/Total, etc
The column names albert, bert, cathy, daniel can be variable, but the column name total is always the same.
Here's what I tried:
for(i=1,i<=nitems(stringlist),i++,
dt<<new column name(eval(stringlist)||" Total",
formula((eval(parse(stringlist))/:total)
)
)
);
I've tried variants of evallist, evalexpr, parse with no avail...