cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

Tabulate a variable column list

I am using the following to generate a column list, which varies but always has an "X_Clean" in the name:

col_list = dt<<get column names(string);
	for(i=nitems(col_list), i>0, i--,
		if(!contains(col_list[i], "X_Clean"),
				remove from(col_list, i);
		)
);

Now I'm trying to create a tabulate box but I'm unsure how to reference this col_list in the Analysis Columns.  

dtLUB= vlistbox(dt<< Tabulate(
	Change Item Label( Statistics( Max, " " ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :Date ), Statistics( Max ) ),
		Column Table(
			Analysis Columns(
Need to insert col_list here somehow
			),
			Statistics( Max )
		),
		Row Table( Grouping Columns( :Entity) )
	),
	SendToReport(
		Dispatch(
			{},
			"Tabulate",
			OutlineBox,
			{Set Title( "PM Counter Summary as of: "|| TimeStamp )}
		)
	),
));
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Tabulate a variable column list

This should work

dtLUB= vlistbox(dt<< Tabulate(
	Change Item Label( Statistics( Max, " " ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :Date ), Statistics( Max ) ),
		Column Table(
			Analysis Columns(
				eval( col_list )
			),
			Statistics( Max )
		),
		Row Table( Grouping Columns( :Entity) )
	),
	SendToReport(
		Dispatch(
			{},
			"Tabulate",
			OutlineBox,
			{Set Title( "PM Counter Summary as of: "|| TimeStamp )}
		)
	),
));
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Tabulate a variable column list

This should work

dtLUB= vlistbox(dt<< Tabulate(
	Change Item Label( Statistics( Max, " " ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :Date ), Statistics( Max ) ),
		Column Table(
			Analysis Columns(
				eval( col_list )
			),
			Statistics( Max )
		),
		Row Table( Grouping Columns( :Entity) )
	),
	SendToReport(
		Dispatch(
			{},
			"Tabulate",
			OutlineBox,
			{Set Title( "PM Counter Summary as of: "|| TimeStamp )}
		)
	),
));
Jim
MuttonChops
Level III

Re: Tabulate a variable column list

Thanks Jim!

Recommended Articles