- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How do I create a formula
I have a column with multiple values captures a different time points. How can I create a new column with a formula that divide the sample based on values above and below the median at baseline
Time Point | Data per subject |
Baseline | 169.8 |
30 Days | 180.6 |
3 Months | 188.1 |
6 Months | 174.98 |
1 Year | 215 |
Baseline | 214.9 |
30 Days | 206.7 |
3 Months | 222.6 |
6 Months | 219.9 |
1 Year | 191.9 |
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I create a formula
Hi @sanchezpeinado ,
There's a few different ways you can do this. Ultimately, you'll want to do a conditional formula based on the values of the baselines. However, your data table is not setup like it really should be for JMP. Looking at your columns, it looks like you should also have another column, maybe "product" or something like that since your "time point" column repeats some entries with a new baseline value. Something like below:
You would then want to split your data table using the Product column and split the other two columns. The new table will look like the one below.
The last two columns in this table are formulas that use a conditional IF statement. Each one references the first cell (baseline) for each "product". To reference a specific cell of a column, after the column name type [], left square bracket followed by right square bracket. You'll then put 1 in there for the first cell of the respective column.
These formulas are set to return a numerical value -1 for below the baseline, 1 for above the baseline. You can change this to whatever you want, text or 0/1 or whatever.
This is just one way to do it, there are other ways. You'll definitely want to change the structure of your data table for JMP though. Having multiple baseline entries in a single column will make creating a formula rather difficult.
Hope this helps!,
DS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I create a formula
Hi @sanchezpeinado ,
There's a few different ways you can do this. Ultimately, you'll want to do a conditional formula based on the values of the baselines. However, your data table is not setup like it really should be for JMP. Looking at your columns, it looks like you should also have another column, maybe "product" or something like that since your "time point" column repeats some entries with a new baseline value. Something like below:
You would then want to split your data table using the Product column and split the other two columns. The new table will look like the one below.
The last two columns in this table are formulas that use a conditional IF statement. Each one references the first cell (baseline) for each "product". To reference a specific cell of a column, after the column name type [], left square bracket followed by right square bracket. You'll then put 1 in there for the first cell of the respective column.
These formulas are set to return a numerical value -1 for below the baseline, 1 for above the baseline. You can change this to whatever you want, text or 0/1 or whatever.
This is just one way to do it, there are other ways. You'll definitely want to change the structure of your data table for JMP though. Having multiple baseline entries in a single column will make creating a formula rather difficult.
Hope this helps!,
DS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I create a formula
Thank you!