Here are three options to create Tab Box from data table using grouping column. If you have JMP18+ (I think), last one is definitely the most simple one
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
// Using subsets
dt_subsets = dt << Subset(
By(:age),
Linked,
Selected Columns Only(0),
All Rows(1),
Invisible
);
nw = New Window("Subsets",
tb = tab box()
);
dists = {};
For Each({dt_subset}, dt_subsets,
tb << Insert(Tab Page Box(Title(dt_subset << get name),
dt_subset << Distribution(
Continuous Distribution(Column(:weight)),
Nominal Distribution(Column(:age))
);
));
);
tb << Set Selected(1);
// Using Where in platform
nw = New Window("Where",
tb = tab box()
);
groups = Associative Array(Column(dt, "age")) << get keys;
dists = {};
For Each({group}, groups,
tb << Insert(Tab Page Box(Title("age=" || Char(group)),
dist = dt << Distribution(
Continuous Distribution(Column(:weight)),
Nominal Distribution(Column(:age)),
Where(:age == group)
);
));
(Report(dist) << Top Parent)[TextBox(1)] << Visibility("Collapse"); // to hide Where(... textbox
);
tb << Set Selected(1);
// Using By in platform
dist = dt << Distribution(
Group Options(Layout("Arrange in Tabs")),
Continuous Distribution(Column(:weight)),
Nominal Distribution(Column(:age)),
By(:age)
);
-Jarmo