- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Column Group with variable Column Count
75 is the number of columns to include in the group. Your code worked perfectly. Thank you!