Using For Loop to Create New Column
Hi
I try to create the new column by using for loop
names default to here (1);
dt = current data table ();
summarize (PN=by (:Name("~DEVICE TYPE" )));
for (i=1, i <= N items(PN), i++,
new column("Cnt "||PN[i],
formula(If( :Name( "~DEVICE TYPE" ) == PN[i],
If( :SERIAL_NO || :TIME_DATE == Lag( :SERIAL_NO || :TIME_DATE, -1 ),0,1)
))));
I can create the new column but cannot get the formula...