cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Jacovz
Level I

Using In Column Data to Calculate a New Column

I am trying to use the data in columns to calculate in a new column.

The columns with data will be ID, From(Depth),and RL

The problem is I want to calculate a "depth" below a specific point (RL).

How I see the formula is if ID=ID and From = 0 then use the RL at From=0 and subtract the RL at the next From and repeat till the a new ID

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Using In Column Data to Calculate a New Column

Here is the formula I used to get the below results

If( :From == 0, hold = :RL );
hold - :RL;

txnelson_0-1669347373777.png

 

Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: Using In Column Data to Calculate a New Column

The description of the data table attached to your entry is different from what is in the attached data table.  The attached data table contains

ID

mFrom

mTo

RL_MGA20

txnelson_0-1669342378797.png

What you describe is that your data table has

     "The columns with data will be ID, From(Depth),and RL"

I do not understand what you are asking for

Jim
Jacovz
Level I

Re: Using In Column Data to Calculate a New Column

 Hi Jim,

 What I am trying to achieve is to create a depth from a common plane / point which is the collar of a drill hole.

 

If ID=ID (from the same hole) and From = 0 then RL(value where From = 0) - RL .

 

I have update the file to better reflect the question, also i added a column Expected_outcome to show what i am trying to achieve.

ID is the drill hole name

From is the depth from the collar at surface

RL is the height of the point with respect to sea level.

Depth_From_0 would be the depth below the surface where From=0 and the corresponding RL

 

txnelson
Super User

Re: Using In Column Data to Calculate a New Column

Here is the formula I used to get the below results

If( :From == 0, hold = :RL );
hold - :RL;

txnelson_0-1669347373777.png

 

Jim
Jacovz
Level I

Re: Using In Column Data to Calculate a New Column

Hi Jim,

Thank you for the solution.