cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
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