cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • We’re improving the Learn JMP page, and want your feedback! Take the survey
Choose Language Hide Translation Bar
Katz0801
Level II

Adding column property units to Table headings

Hello All,

 

I have a JMP file with multiple columns for different analytical assays each with the column property units. When I use tabulate to create a table and selecting the columns I get the column name but not the units. I don't want to add the units into the column titles themselves as that will effect a lot of other scripts I have. I did try just changing the statistics label to the assay name and units and then removing the column label which does work but this means that I need to make a new table script for each assay rather than using the column switcher which would be a lot easier for other people using this in the future. Any idea how to add units? either in the column label or by updating the statistic item label to always show the units for the column selected.

 

Example Tabulate script:

Tabulate(
	Change Item Label( Statistics( Sum, "Add units here?" ) ),
	Remove Column Label( Grouping Columns( :Run Number ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table(
			Analysis Columns( :Total Protein ),
			Statistics( Sum ),
			Grouping Columns( :Run Number )
		),
		Column Table(
			Analysis Columns( : Total Protein ),
			Statistics( Mean )
		),
		Row Table( Grouping Columns( :Samples ) )
	),
	Local Data Filter(
		Mode( Show( 0 ) ),
		Add Filter(
			columns( :Sample Type ),
			Where(
				:Sample Type == {"Sample 1", " Sample 2", "Sample 3"
				"Sample 4", "Sample 5"}
			),
			Display( :Sample Type, N Items( 6 ) )
		)
	),
	Column Switcher(
		:Total Protein,
		{:Total DNA, :Total Sugar, :Total Polysaccharide }
	)
);
2 REPLIES 2
Victor_G
Super User

Re: Adding column property units to Table headings

Hi @Katz0801,

 

You can add "Unit" as a column property : Set or Get Column Properties 

Doing it so will make the unit appear in the column in the datatable, but not in its name (so no recoding/renaming involved).

The JSL script is : 

col<<Set Property( "units", "grams" );

 

If you have several columns, you can use Standardize Attributes and Properties Across Columns to add Unit property to each selected columns, and then add the specific unit types.

 

Hope this answer will help you,

Victor GUILLER

"It is not unusual for a well-designed experiment to analyze itself" (Box, Hunter and Hunter)
Katz0801
Level II

Re: Adding column property units to Table headings

Hi. 

 

Thank you for your reply. I do have the unit property on all my columns my issue is that I don't know how to get those units to appear when creating a table using the tabulate function. I did try using <<Get property ("units") within my table script but it didn't work and wouldn't have functioned with the column switcher as well.

 

Katy

Recommended Articles