Subscribe Bookmark RSS Feed

Range Check on Derived Columns

natalie_

Community Trekker

Joined:

Jan 6, 2016

Hi everyone,

 

I have copied/duplicated columns in my data table.  I would like to do a range check on the copied columns, but when I do, it tells me that I can not do a range check on derived columns.  The easiest work around (I think) would be to just do the range check on the original column, but I would like to know if there is a way to do this on the copied column.

 

Current Data Table(dt);
cn = dt << get column names();
For(i=5, i <= N Items(cn), i++,
name = Char((cn[i])) || " Pass";
dt << clear column selections;
colCopy = cn[i] << getscript;
Eval(Substitute(Name Expr(colCopy), Arg(Name Expr(colCopy),1), name )) << set selected(1);
col = Column(name);
dt:col << Suppress Eval;
);



dt:Gate Pass << Set Property("Range Check", LTLE(0,50) );

 

1 ACCEPTED SOLUTION

Accepted Solutions
natalie_

Community Trekker

Joined:

Jan 6, 2016

Solution

The problem was so obvious!  I didn't set the data type to numeric.  Ah!

7 REPLIES
Phil_Brown

Super User

Joined:

Mar 20, 2012

Not able to reproduce your issue. I am using JMP 12/13. I am able to apply a range check to the new columns as you explained. Now, if a column is based on a formula, then no, you cannot apply Range Check. What version of JMP are you using?

PDB
natalie_

Community Trekker

Joined:

Jan 6, 2016

Oh really? I am using JMP 12.
natalie_

Community Trekker

Joined:

Jan 6, 2016

Oh actually it's happening on columns that weren't even copied.  Has anyone seen this problem before?

Phil_Brown

Super User

Joined:

Mar 20, 2012

Is the code you posted exactly what you're using? If not please post anything that's missing

PDB
natalie_

Community Trekker

Joined:

Jan 6, 2016

Solution

The problem was so obvious!  I didn't set the data type to numeric.  Ah!

Phil_Brown

Super User

Joined:

Mar 20, 2012

That certainly explains it! Glad you figured it out.

PDB
markbailey

Staff

Joined:

Jun 23, 2011

A column populated by a formula would include the range checking in the formula itself. For example,

If( lower bound < computation < upper bound, result, . )
Learn it once, use it forever!