cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

Using Column Properties in Column Functions?

Is there a way to create a new function column within a table that uses the properties of another column along with that column's data?

 

For instance, making a flag column for items outside of assigned LSL and USL?

 

I know I can do it by using JSL and iteratively evaluating cell values and Get Property ... etc, but that seems unnecessarily complex for such a simple comparison and logic operation. In particular, the nested Spec-->LSL and Spec-->USL are not easy to work with when one or both may be missing on a particular column.

 

1 REPLY 1
jthi
Super User

Re: Using Column Properties in Column Functions?

You could use a formula with something like this:

If(Row() == 1,
	specs = :NPN1 << Get Property("Spec Limits");
	lsl = Try(specs["LSL"], .);
	usl = Try(specs["USL"], .);
	val = .;
);
val = IfMZ(:NPN1 < lsl | :NPN1 > usl, 1, 0);
val;

but if you have many columns to check, I think this is easier to do on tall/stacked data in which you can have columns such as parameter, value, lsl and usl. Then with those you can easily create a formula for flagging.

 

Some platforms also allow you to select and color out of spec values, but these might work only on one column at a time.

-Jarmo

Recommended Articles