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
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