cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

JMP Wish List

We want to hear your ideas for improving JMP. Share them here.
Choose Language Hide Translation Bar
0 Kudos

Have syntax for specifying multiple consecutive columns

This script works.

 

 

dt << New Column( "FrontPeak",
	"numeric",
	"continuous",
	setFormula(
		If( :DISPENSESPEED == 1550,
			Maximum(
				:R029,
				:R030,
				:R031,
				:R032,
				:R033,
				:R034,
				:R035,
				:R036,
				:R037,
				:R038
			) * 1000,
			.
		)
	)
);

 

However it would be nice to be able to be able to specify columns :R029 to :R038 or what ever number of columns.

 

Like the excel

 

=AVERAGE(A1:G1)

 

 

 

2 Comments
gzmorgan0
Super User (Alumni)

Hi @UberBock,

This is not to lessen the value of your request, however, when scripting there is a pretty easy solution since JMP 13. This can also be specified using the formula editor, but it is a little more cumbersome. See the script, the formula and the result below. I don't store formulas in data table unless they are necessary.  The formula editor warns against using Current Data Table() in a formula, so the formula needs the table name. Using my preferred Set Each Value() instead of a formula, the table reference (dt or name in you script) can be used instead of the data table name.

 

Names Default to Here(1);

dt = Open("$Sample_Data/Semiconductor Capability.jmp");

testcol = dt << New Column("Maximum 7-11", numeric, continuous,
	Formula(If(:SITE==5, Maximum(Data Table("Semiconductor Capability")[row(),4::7]) ))
);

image.png

 

image.png

Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!