Ciao,
Voglio creare una nuova colonna nella seconda tabella JMP con una formula che somma semplicemente le colonne contenute nell'elenco (nel codice a cui ho assegnato il nome della colonna bidoni.
Non riesco a capire cosa sto facendo di sbagliato passando dall'elenco {""} di colonne al riferimento alle colonne.
Ogni aiuto è molto apprezzato.
Ecco il codice che ho provato
Names Default To Here( 1 );
Clear Globals();
dt = Data Table( "Untitled 910" );
dt2 = Data Table( "Soft Bin Summary" );
Try( For Each Row( :Yield SummaryBins = Word( 1, :Yield SummaryBins, "[]" ) ) );
grouplist = dt:Yield SummaryBins << get values;
For( i = N Items( grouplist ), i >= 1, i--,
If( grouplist[i] == "",
Remove From( grouplist, i, 1 ),
)
);
binss = {}; /// list contaiting bin value
For( i = 1, i <= N Items( grouplist ), i++,
If( Contains( grouplist[i], " " ),
Insert Into( binss, grouplist[i] )
)
);
adad = Words( binss[1], " " );
/*sitenum = Transform Each( {str}, adad, Num( str ) );
newl = {};*/
F = Eval Expr( Sum( Expr( adad ) ) );
//For( i = 1, i <= N Items( adad ), i++,
//
// Insert Into( newl, ":" || adad[i] )
//);
/*rtrt = Concat Items( newl, "n," );*/
For( i = 1, i <= N Items( binss ), i++,
dt2 << New Column( binss[i], "Numeric", "Continuous", Format( "Percent", 12, 2 ), Formula( Name Expr( F ) ) );); /// Something doesn't seem to right
/*Eval( Eval Expr( dt2 << New Column( "Sums_expr", Format( "Percent", 12, 2 ), formula( Sum( Expr( (newl) ) ) ) ) ) );*/
/*
Eval( Parse( "dt2 << new column(\!"Sums\!", formula(sum( " || rtrt || " )));" ) );*/
Grazie,
Jack