Column Group with variable Column CountQuery_DT << GROUP COLUMNS("WEEKS",COLUMN(12),<STRONG>75</STRONG>);
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?
Data Blending and CleanupRe: Column Group with variable Column Count75 is the number of columns to include in the group. Your code worked perfectly. Thank you!
Re: Column Group with variable Column CountWhat 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);