cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
FN
FN
Level VI

Table formula

JMP has something called 'table variables'. 

 

Similarly, how can I create a function linked to a table that can be used as part of a column formula? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Table formula

Referring to Table Variables is done in same way as referring to Columns

 

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Table Variable("Days", "42");
dt << New Column("Age+Days", Numeric, Continuous, Formula(:Age + num(:Days)));

https://community.jmp.com/t5/Discussions/How-to-reference-a-table-variable-inside-a-table-variable/t... 

 

Also search Scripting Guide for Table Variable for more info such as:

Table Variables

Table variables are for storing a single text string value, such as "Notes".

 

It also has info on the name resolution ordering (if you have same name in column and table variable, column will be preferred over table variable)

 

Edit:

If you want to have functions which can be used in formulas, you can directly write them into the formulas, but I would suggest creating custom formulas:

Create Custom Functions 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Table formula

Referring to Table Variables is done in same way as referring to Columns

 

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Table Variable("Days", "42");
dt << New Column("Age+Days", Numeric, Continuous, Formula(:Age + num(:Days)));

https://community.jmp.com/t5/Discussions/How-to-reference-a-table-variable-inside-a-table-variable/t... 

 

Also search Scripting Guide for Table Variable for more info such as:

Table Variables

Table variables are for storing a single text string value, such as "Notes".

 

It also has info on the name resolution ordering (if you have same name in column and table variable, column will be preferred over table variable)

 

Edit:

If you want to have functions which can be used in formulas, you can directly write them into the formulas, but I would suggest creating custom formulas:

Create Custom Functions 

-Jarmo