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
rvs
rvs
Level II

How to make a formula (Delta / %Delta) in JMP

Hi everyone, need some help..

From JMP sample data (Raleigh Temps) shown below, I had added the last 2 columns and made a calculation in excel based on the formula for "Delta in Temp" by month  as "=C2-$C$2, =C3-$C$2, =C4-$C$2 and so on.."  and  for "% Delta in Temp"  as "=G2/C2" (% formatted).


Now, I would like to do the same in JMP.  Could someone show me how to make the formula or script in JMP?  Thanks in advance  

        

MonthYearTemperatureMonth/YearPredicted TemperatureMonth NumberDelta in Temp% Delta in Temp
1198048.92Jan-8088.1859485100%
2198048.02Feb-8072.82240022-0.9-2%
3198056.84Mar-8054.863950137.9214%
4198075.74Apr-8050.8215145426.8235%
5198081.86May-8064.41169532.9440%
6198086.54Jun-8083.139732637.6243%
7198089.24Jul-8089.7871649740.3245%
8198090.86Aug-8078.2423697841.9446%
9198084.2Sep-8059.1195778935.2842%
10198069.62Oct-8050.00019591020.730%
11198060.98Nov-8059.26854161112.0620%
12198052.16Dec-8078.4033407123.246%
1198145.86Jan-8189.81214711300%
2198156.84Feb-8183.00575681410.9819%
3198159.18Mar-8164.24193371513.3223%
4198174.48Apr-8150.77205021628.6238%
5198175.74May-8154.98025511729.8839%
6198188.7Jun-8172.99754421842.8448%
7198189.42Jul-8188.2589051943.5649%
8198183.84Aug-8186.73311282037.9845%
9198179.34Sep-8169.82297382133.4842%
10198169.44Oct-8153.07559192223.5834%
11198162.24Nov-8151.88843282316.3826%
12198148.56Dec-8167.352965242.76%
1198244.06Jan-8285.2511692500%
2198255.04Feb-8289.12751862610.9820%
3198262.96Mar-8275.41811582718.930%
4198269.62Apr-8256.72732232825.5637%
5198283.84May-8250.23936752939.7847%
6198284.02Jun-8261.91924713039.9648%
7198288.34Jul-8281.02853363144.2850%
8198286.36Aug-8289.99823723242.349%
9198280.96Sep-8280.58165373336.946%
10198271.06Oct-8261.4363466342738%
11198263.5Nov-8250.16442293519.4431%
12198257.02Dec-8257.12923733612.9623%
7 REPLIES 7
saitcopuroglu
Level IV

Re: How to make a formula (Delta / %Delta) in JMP

I am also a beginner and need to know how to do it. As far as I know it is something related to functions"row" or "evaluate" but that's all I guess.

Probably a developer or a guru from SAS will lift you up.

Please also let me know when you've got it.

many thanks

Jeff_Perkinson
Community Manager Community Manager

Re: How to make a formula (Delta / %Delta) in JMP

You use a subscript on a column reference to index into a specific row. In your case, row 1.8910_JMPScreenSnapz002.png

So the formula for Delta in Temp looks like this:

8911_JMPScreenSnapz004.png

-Jeff

-Jeff
Craige_Hales
Super User

Re: How to make a formula (Delta / %Delta) in JMP

And the percentage change may not make sense, especially as the temperature gets close to zero.  Zero Fahrenheit does not happen often in Raleigh.  But  same idea, without needing a subscript. 

Craige
Jeff_Perkinson
Community Manager Community Manager

Re: How to make a formula (Delta / %Delta) in JMP

I just realized that you were resetting your Delta at the beginning of every year. In this case you'll need to index your subscript based on the month in the current row. Like this:

8912_JMPScreenSnapz005.png

-Jeff

-Jeff
shoffmeister
Level V

Re: How to make a formula (Delta / %Delta) in JMP

It's not really different from Jeff's solution, but I like this:

8915_jmp.PNG

rvs
rvs
Level II

Re: How to make a formula (Delta / %Delta) in JMP

Thanks for all your helps! My question has been answered and did tried it on JMP. Thanks again.

Here's a new set of  data table below where basically do the same thing, ie, get the Delta in Data by Event Date. However, I have 3 serial numbers and 2 variables under LOC.

First, would like to convert the Event Date into Hours. Then take the Delta in Data by Hours by Serial no and Loc.

Really appreciated your quick reply.

EVENT_DATESERIAL NO.LOCDATA
05/04/2015 9:50 PM10422
05/04/2015 9:50 PM11389
05/05/2015 11:54 AM10423
05/05/2015 11:54 AM11387
05/06/2015 2:01 AM10423
05/06/2015 2:01 AM11385
05/06/2015 4:11 PM10422
05/06/2015 4:11 PM11386
05/07/2015 6:08 AM10424
05/07/2015 6:08 AM11387
05/07/2015 7:47 PM10428
05/07/2015 7:47 PM11389
05/08/2015 9:22 AM10425
05/08/2015 9:22 AM11389
05/04/2015 9:28 PM20564
05/04/2015 9:28 PM21454
05/05/2015 10:33 AM20564
05/05/2015 10:33 AM21456
05/05/2015 11:29 PM20565
05/05/2015 11:29 PM21455
05/06/2015 12:49 PM20567
05/06/2015 12:49 PM21454
05/07/2015 2:15 AM20567
05/07/2015 2:15 AM21454
05/07/2015 3:44 PM20567
05/07/2015 3:44 PM21454
05/08/2015 5:11 AM20566
05/08/2015 5:11 AM21454
05/08/2015 6:36 PM20567
05/08/2015 6:36 PM21452
05/04/2015 9:42 PM30422
05/04/2015 9:42 PM31506
05/05/2015 11:37 AM30421
05/05/2015 11:37 AM31505
05/06/2015 1:34 AM30422
05/06/2015 1:34 AM31502
05/06/2015 3:32 PM30421
05/06/2015 3:32 PM31502
05/07/2015 5:31 AM30423
05/07/2015 5:31 AM31508
05/07/2015 7:28 PM30421
05/07/2015 7:28 PM31502
05/08/2015 9:25 AM30421
05/08/2015 9:25 AM31503
Craige_Hales
Super User

Re: How to make a formula (Delta / %Delta) in JMP

Date and Time Functions might help you get the hours you need from the date.

Craige