Hi, I'm wondering if there is a way to show a value in every row of a grouping column when using Tabulate. For example in the table generated from the below, show a value for each row for country.
NamesDefaultToHere(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))
)
);
If you "Make into data table" under red triangle menu of tabulate, the resulting data table would have a country in every row. Perhaps this helps?
If you make the Tabulate table into a data table, you can then create a new window and use a Table Box() to create your desired output
Data Table from Tabulate

Script to generate the Window with the Table Box()
Names Default To Here( 1 );
dt = Current Data Table();
New Window( "table",
tb = Table Box(
String Col Box( "Country", dt:country << get values ),
String Col Box( "size", dt:size << get values ),
Col Span Box(
"Sex",
Col Span Box(
"Female\!nMarital Status",
Number Col Box( "Married", dt:Female Marital Status married << get values ),
Number Col Box( "Single", dt:Female Marital Status single << get values )
),
Col Span Box(
"Male\!nMarital Status",
Number Col Box( "Married", dt:male Marital Status married << get values ),
Number Col Box( "Single", dt:male Marital Status single << get values )
)
)
)
);
What the output looks like
