cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
JeromeH
Level I

how do i create a customized tabulate table adding free text comments summary

Hi,

I am building a reporting table where I aggregate statistics for different production campaign, I would leave the opportunity to user to add free text descriptive comments, for each campaign.

I tried one way by adding text column "comment" to my  data table, where user can add multiple comment at different rows  (different moment of the campaign).

I used the tabulate option in my script to generate the stats. I can not find the way to easily add the free text comments in tabulate table (I was thinking concatenating the different comments/character strings into one comment/summary for each campaign)

Scrolling the community, one way might be to create a similar table box, with more flexibility to add an additional row with free text comments? I must admit it starts to be over my scripting skills:-)

working on JMP 16.

 

my test table looks like that 

JeromeH_0-1642179209704.png

and the classic tabulate script is here

Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Grouping Columns( :Campaign ID ) ),
		Row Table( Analysis Columns( :U.R24, :E401.Run, :LVL.BED.R24 ), Statistics( Mean ) )
	),
	Local Data Filter(
		Add Filter(
			columns( :POLY.GRADE ),
			Where( :POLY.GRADE == "PPK0132F" ),
			Display( :POLY.GRADE, N Items( 15 ) )
		)
	)
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: how do i create a customized tabulate table adding free text comments summary

You could use GROUP_CONCAT with SQL-query to get comments concatenated. Here is example using Big Class:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt_concat = Query(
	Table(dt, "t1"),
	"\[
SELECT sex, GROUP_CONCAT(name)
FROM t1
GROUP BY sex
	]\"
);

dt << Update(
	With(dt_concat),
	Match Columns(:sex = :sex)
);

dt << Tabulate(
	Show Control Panel(0),
	Add Table(
		Column Table(Analysis Columns(:height, :weight), Statistics(Mean)),
		Row Table(Grouping Columns(:sex, :"GROUP_CONCAT(name)"n))
	)
);

jthi_0-1642499606317.png

Depending on the use, I would most likely prefer using Summary table instead of Tabulate.

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: how do i create a customized tabulate table adding free text comments summary

You could use GROUP_CONCAT with SQL-query to get comments concatenated. Here is example using Big Class:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt_concat = Query(
	Table(dt, "t1"),
	"\[
SELECT sex, GROUP_CONCAT(name)
FROM t1
GROUP BY sex
	]\"
);

dt << Update(
	With(dt_concat),
	Match Columns(:sex = :sex)
);

dt << Tabulate(
	Show Control Panel(0),
	Add Table(
		Column Table(Analysis Columns(:height, :weight), Statistics(Mean)),
		Row Table(Grouping Columns(:sex, :"GROUP_CONCAT(name)"n))
	)
);

jthi_0-1642499606317.png

Depending on the use, I would most likely prefer using Summary table instead of Tabulate.

-Jarmo