New Table( "inputdata",
Add Rows( 308 ),
New Column( "dates",
Character,
Nominal,
Set Values(
{"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "07/10/2017", "07/17/2017", "07/17/2017", "07/17/2017",
"07/17/2017", "07/17/2017", "07/17/2017", "07/24/2017", "07/24/2017",
"07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017", "07/24/2017",
"07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017", "07/10/2017",
"07/10/2017", "", ""}
)
),
New Column( "codes",
Numeric,
Continuous,
Format( "Best", 8 ),
Set Values(
[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4]
)
));Sì. Incollerò lo script breve con il ciclo if qui sotto. e il set di dati è allegato sopra.
Grazie per aver già guardato questo!
script:
digitale terrestre = Tabella dati ( "dati in ingresso" ) ;
// opzione 1, non funziona come desiderato
COLC = digitale terrestre << newColumn ( "Codefin" , Formula ( carbonizzare ( : date ) || "_" || carbonizzare ( : codici ))) ;
ID = digitale terrestre << Nuova colonna ( "ID" ,
Numerico ,
Continuo ,
Formato ( "Migliore" , 8 ) ,
Formula ( Se ( Riga () == 1 ,
Ricapitolare ( bygroup = di ( : date ) ) ;
Se ( bygroup [ 1 ] == "" ,
newbygroup = Rimuovere ( bygroup , 1 ) ,
newbygroup = bygroup
) ;
) ;
( Loc ( newbygroup , : date ) - 1 ) * 7 + : codici ; ) ,
essere selezionato
) ;