cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
saitcopuroglu
Level IV

Renaming and/or saving data tables

I create a data table through tabulate and need to do further reports on that data table but each time it gives a name to data table "untitled XXX" (in this case untitled 14) . And since I need to automate the reporting and need to do it several times a day I need a "fixed name" for that data table  (and further save or not). How will I do it?

Thanks for your help

(Data Table( "AgencyStayISL.jmp" ) << Tabulate(

  Show Control Panel( 0 ),

  Uniform plot scale( 0 ),

  Add Table(

  Column Table(

  Analysis Columns(

  :RoomNight,

  :AdultNight,

  :PaidChildNight,

  :FreeChildNight,

  :BabyNight,

  :ArrivalRoom,

  :ArrivalAdult,

  :ArrivalFreeChild,

  :ArrivalPaidChild,

  :ArrivalBaby

  ),

  Statistics( Sum )

  ),

  Column Table( Analysis Columns( :ADR ), Statistics( Mean ) ),

  Column Table( Analysis Columns( :ADB ), Statistics( Mean ) ),

  Row Table( Grouping Columns( :Year, :Month, :day ) )

  )

)) << Make Into Data Table

8373_Screen Shot 2015-03-15 at 13.02.19.png

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: Renaming and/or saving data tables

A couple of recommendations:

1. Use a table variable instead of referring to a table by name.

2. Include the invisible keyword for the tabulation.  Less flashy-thingy effect

3. Use set name("new name") to change the name of the untitled table

Try the following code:

dt1 = Data Table( "AgencyStayISL" );

dtab = dt1 << Tabulate(

     Show Control Panel( 0 ),

     Uniform plot scale( 0 ),

     Add Table(

           Column Table(

                Analysis Columns(

                     :RoomNight,

                     :AdultNight,

                     :PaidChildNight,

                     :FreeChildNight,

                     :BabyNight,

                     :ArrivalRoom,

                     :ArrivalAdult,

                     :ArrivalFreeChild,

                     :ArrivalPaidChild,

                     :ArrivalBaby

                ),

                Statistics( Sum )

           ),

           Column Table( Analysis Columns( :ADR ), Statistics( Mean ) ),

           Column Table( Analysis Columns( :ADB ), Statistics( Mean ) ),

           Row Table( Grouping Columns( :Year, :Month, :day ) )

     ),

     invisible

);

dt2 = dtab << Make Into Data Table;

dt2 << set name( "My Data Table Name" );

View solution in original post

2 REPLIES 2
pmroz
Super User

Re: Renaming and/or saving data tables

A couple of recommendations:

1. Use a table variable instead of referring to a table by name.

2. Include the invisible keyword for the tabulation.  Less flashy-thingy effect

3. Use set name("new name") to change the name of the untitled table

Try the following code:

dt1 = Data Table( "AgencyStayISL" );

dtab = dt1 << Tabulate(

     Show Control Panel( 0 ),

     Uniform plot scale( 0 ),

     Add Table(

           Column Table(

                Analysis Columns(

                     :RoomNight,

                     :AdultNight,

                     :PaidChildNight,

                     :FreeChildNight,

                     :BabyNight,

                     :ArrivalRoom,

                     :ArrivalAdult,

                     :ArrivalFreeChild,

                     :ArrivalPaidChild,

                     :ArrivalBaby

                ),

                Statistics( Sum )

           ),

           Column Table( Analysis Columns( :ADR ), Statistics( Mean ) ),

           Column Table( Analysis Columns( :ADB ), Statistics( Mean ) ),

           Row Table( Grouping Columns( :Year, :Month, :day ) )

     ),

     invisible

);

dt2 = dtab << Make Into Data Table;

dt2 << set name( "My Data Table Name" );

Roselle_Grant
Level II

Re: Renaming and/or saving data tables

Thank you very much. This worked