cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

Discussions

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

Column Group with variable Column Count

Query_DT << GROUP COLUMNS("WEEKS",COLUMN(12),75);
COLGRP = Query_DT << GET COLUMN GROUP ("WEEKS");

Query_Stack = Query_DT << STACK(columns(COLGRP),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" )
);

I need to group columns to create a stacked table..  the problem is that the number of columns can vary.  This code works fine, except in the Group Columns function I need the 75 to be a variable count of columns from that same starting position.

 

I can't seem to find exactly what I'm looking for in either the Scripting Library or the search here.  Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Column Group with variable Column Count

What is the number 75 based on?

 

Script below will group columns starting from start_idx column to the last column

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
start_idx = 4;
dt << Group Columns(Column(start_idx), N Cols(dt) - start_idx + 1);
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Column Group with variable Column Count

What is the number 75 based on?

 

Script below will group columns starting from start_idx column to the last column

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
start_idx = 4;
dt << Group Columns(Column(start_idx), N Cols(dt) - start_idx + 1);
-Jarmo
Phil_Nash
Level III

Re: Column Group with variable Column Count

75 is the number of columns to include in the group.  Your code worked perfectly.  Thank you!

Recommended Articles