Choose Language Hide Translation Bar
Highlighted
Hegedus
Level IV

Summary Table

I would like to script the creation of a summary table with the minimum value of each column, with the caveat I do not know the number or name of the columns ahead of time.  It can vary with different input files.  If I do it manually I get a script tied to the specific column names in my example table. What do I need to change in the Min(.... section to pass all the column names?

Data Table( "FSL Card CRes Pd Chuck Return 2" ) <<

Summary(

  Min( :Name( "1" ) ),

  Min( :Name( "2" ) ),

  Min( :Name( "3" ) ),

  Min( :Name( "4" ) ),

  Min( :Name( "5" ) ),

  Min( :Name( "6" ) ),

  Min( :Name( "7" ) ),

  Min( :Name( "8" ) ),

  Min( :Name( "9" ) ),

  Min( :Name( "10" ) ),

  Min( :Name( "11" ) ),

  Min( :Name( "12" ) ),

  Freq( "None" ),

  Weight( "None" ),

  statistics column name format( "column" )

)


This does not work


CrefDT=current data table();

CRefMinDT = Data Table( CRefDT ) << Summary(

  min( (columns( CRefDT << get column names ))),

  Freq( "None" ),

  Weight( "None" ),

  statistics column name format( "column" )

  );

1 REPLY 1
Highlighted
Hegedus
Level IV

Re: Summary Table

Figured it out.

CrefDT=current data table();

CRefMinDT = Data Table( CRefDT ) << Summary(

  min( CRefDT << get column names )),

  Freq( "None" ),

  Weight( "None" ),

  statistics column name format( "column" )

  );


I seem to have use different syntax for the column list depending for update vs. join vs. split vs. stack.  Very confusing.

Article Labels

    There are no labels assigned to this post.