cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

Generate extra columns and its values based on two tables.

Hi All,

I need some help in doing a calculation based on two separate data sets. First data set has different values in different columns. And in 2nd table, there are three main character columns. Now based on a these three columns and based on matching other conditions, we need to perform subtraction operation in first table and results need to be store in a new column in first table.
Something like this -

 

HSS_0-1656586183072.png

 


Names Default to here(1);

dt1 = Data Table("Dataset");
dt2 = Data set("Realtime");

//Create R1 column in Table 1.
// In Table 1, Somehow find the matching values for board and sensor from Table 2 and perform the calculation from different columns
// Board == M & Sensor == 2 and C11 & C8 is not missing then R1 = C11 - C8, otherwise leave it empty
// Board == M & Sensor == A and C11 & C10 is not missing then R1 = C11 - C10, otherwise leave it empty
// and so on.
//Create R2 column in Table 1 and then calculate values
//
// Probably in first loop we can generate 8 columns from R1 to R8 and then calculate each value of these columns somehow.

Any help?

1 REPLY 1
frank_wang
Level IV

Re: Generate extra columns and its values based on two tables.

Hi HSS

I'm not sure the idea is what your want.

IMO, you could Inner Join the 't1' & 't2' which indexes are 'Board' & 'Sensor'. Then got a 't3'.

In 't3', create Col(R1) with formula(if(condition1&2&3&4, R1=C11-C8, else "Empty").

B.R.

心若止水

Recommended Articles