cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
jnikkel
Level II

Customize Column Name in Tabulate Funtion JSL

Hello,

I am having difficulty deciphering how to customize the resultant column names from the tabulate script function. My code is here:

obj3 = dt4 << Tabulate(
		Add Table(
			Column Names( :Batch No Intercept ),
			Column Table(
				Grouping Columns( :Batch No Intercept ),
				Analysis Columns( :Aging Rate )
			),
			Row Table( Grouping Columns( :Y Intercept ) )
		 )
	);
	
	obj 3 << Make Into Data Table;

As my column "Batch No Intercept" is a continuous column of sample numbers (###-##-1, ###-##-2, etc) the resultant column names from this script follow: "Sum(Aging Rate, Sample number)"

 

I would like to have the resultant data table only define the column name as exclusively the sample number.

 

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Customize Column Name in Tabulate Funtion JSL

Here is one way to get what you want

names default to here(1);
dt4=current data table();
dt5 = dt4 << Summary(
	Group( :Y Intercept ),
	Sum( :Aging Rate ),
	Subgroup( :Batch No Intercept ),
	Freq( "None" ),
	Weight( "None" ),
	statistics column name format( "column" ),
	Link to original data table( 0 )
);

dt5 << delete columns( "N Rows");
for(i=1,i<=N Cols(dt5),i++,
	if(word(1,as column(dt5,i)<<get name,"(),") == "Aging Rate",
	column(dt5,i) << set name(word(2,as column(dt5,i)<<get name,"(),")))
);

Using the Summary Platform automatically produces a data table as the output.

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Customize Column Name in Tabulate Funtion JSL

Here is one way to get what you want

names default to here(1);
dt4=current data table();
dt5 = dt4 << Summary(
	Group( :Y Intercept ),
	Sum( :Aging Rate ),
	Subgroup( :Batch No Intercept ),
	Freq( "None" ),
	Weight( "None" ),
	statistics column name format( "column" ),
	Link to original data table( 0 )
);

dt5 << delete columns( "N Rows");
for(i=1,i<=N Cols(dt5),i++,
	if(word(1,as column(dt5,i)<<get name,"(),") == "Aging Rate",
	column(dt5,i) << set name(word(2,as column(dt5,i)<<get name,"(),")))
);

Using the Summary Platform automatically produces a data table as the output.

Jim
jnikkel
Level II

Re: Customize Column Name in Tabulate Funtion JSL

That worked perfectly! Thank you. One other quick question, when ordering the column, JMP puts 123-45-10 above 123-45-1, instead of at the end of the series example:

 

123-45-10   instead of  123-45-1

123-45-1                       123-45-2

123-45-2                        ...

...                                  123-45-9

123-45-9                       123-45-10

 

Column properties are Character and Nominal. What is the root cause of this?

Recommended Articles