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

Convert tab headers in tabulate to column groups JMP19

Hello,

 

In JMP19 there is very nice new functionality where grouping columns create column headers in the data table.

Thus, we wanted to know if when we do a tabulate , and we do "Make into data table" , can we keep the headers ?

I know we can keep the headers as tags, but otherwise can I transform the tags to group columns?

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
obj = dt << Tabulate(
	Add Table(
		Column Table( Grouping Columns( :sex, :marital status ) ),
		Row Table( Grouping Columns( :country, :size ) )
	)
);

tbl = obj << make into data table();
3 REPLIES 3
jthi
Super User

Re: Convert tab headers in tabulate to column groups JMP19

I don't think you can do it without scripting, but you could make a wish list item?

-Jarmo

Re: Convert tab headers in tabulate to column groups JMP19

But do it in scripting it suits me also, but I didn't get a JSL command to retrieve the list of all current tags in the table or something else to achieve the result I wanted

jthi
Super User

Re: Convert tab headers in tabulate to column groups JMP19

You could build them from column properties (there definitely should be << Get Tags or something similar)

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Car Poll.jmp");
tab = dt << Tabulate(
	Add Table(
		Column Table(Grouping Columns(:sex, :marital status)),
		Row Table(Grouping Columns(:country, :size))
	)
);

dt_tab = tab << make into data table;

tags = {};
For Each({colname}, dt_tab << Get Column Names("String"),
	prop = Column(dt_tab, colname) << Get Property("Tags");
	If(!Is Empty(prop),
		Insert Into(tags, prop);	
	);
);

And build it from there while taking into account the hierarchy of the groups.

Other option could be to utilize Full Path Column Name(1) but it does affect the column names (and tags)

jthi_0-1765896185094.png

 

-Jarmo

Recommended Articles