<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Delta calculations in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678503#M86484</link>
    <description>&lt;P&gt;To facilitate the task:&lt;/P&gt;&lt;P&gt;This is definitely a case that should be included in the&amp;nbsp;&lt;LI-MESSAGE title="Normalization GUI" uid="675055" url="https://community.jmp.com/t5/JMP-Add-Ins/Normalization-GUI/m-p/675055#U675055" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1694949516526.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56698iBD2B939E70D73BAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1694949516526.png" alt="hogi_0-1694949516526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Sep 2023 11:19:18 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2023-09-17T11:19:18Z</dc:date>
    <item>
      <title>Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678480#M86480</link>
      <description>&lt;P&gt;I have a dataset with hourly observations the last three years og different water meters.&amp;nbsp;&lt;BR /&gt;The issue is that the observations shows the meter stand, and not the water usage.&amp;nbsp;&lt;BR /&gt;I want to calculate/show a delta change for each hour, for each water meter. How do I approach that?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Some of the analysis I want to make with this dataset is to find if a meter has a negative usage at one point (indicating water running the wrong way) or that a meter has to big a delta indicating a leakage.&lt;BR /&gt;&lt;BR /&gt;My workplace is starting to work on data quality, so besides the above I will also want to look at things like if timestamps are consistent or&amp;nbsp;if there is change in the timestamps (if observations for a specific meter is not comming back at the same minut-number each hour).&amp;nbsp;&lt;BR /&gt;One analysis tool I am looking forward to explore is the process quality&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 06:11:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678480#M86480</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-17T06:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678499#M86481</link>
      <description>&lt;P&gt;You could sort the data by meter and time and then use the &lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/row-functions-2.shtml?os=win&amp;amp;source=application#ww2736368" target="_self"&gt;&lt;STRONG&gt;lag&lt;/STRONG&gt; &lt;/A&gt;function (&lt;EM&gt;&lt;FONT face="courier new,courier"&gt;lag (:column, 1)&lt;/FONT&gt; = value of the previous row&lt;/EM&gt;) to calculate the consumption:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;new table("test",add rows(100),
new column ("meter", Nominal, Set Each value (Step(row(),10*(0::11)+1,(0::11)))),
new column ("time",Format( "m/d/y h:m"), set each value(Date DMY( 17, 9, 2023 )+mod(row()-1,10)*3600)),
new column ("reading"));

new column("consumption",  set each value(if(row()==1 |:meter != lag(:meter,1),0,random uniform(0,10))));
for each row( if(row()==1 |meter != lag(:meter,1), :reading =random uniform(0,10000),: reading = lag(:reading,1)+ :consumption));


new column("consumption-calc",Formula( if(row()==1 |:meter != lag(:meter,1),0, :reading - lag(:reading,1))));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 14:09:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678499#M86481</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-17T14:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678500#M86482</link>
      <description>&lt;P&gt;Thanks. I can try it tomorrow.&amp;nbsp;&lt;BR /&gt;But will this be able to differentiate between each unique meter?&lt;BR /&gt;(I have 22 at the moment, scaling to several thousands later) .&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I have the rows: MeterNumber; Datetime; CounterValue;&lt;BR /&gt;&lt;BR /&gt;Exported data from the metering software is by default ordered by datetime (2023-09-17 13:09)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 09:11:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678500#M86482</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-17T09:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678502#M86483</link>
      <description>&lt;P&gt;Fear not,&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;if(:meter != lag(:meter,1)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;will make sure of that - but you have to sort the data accordingly:&lt;/P&gt;&lt;P&gt;With meter on the left, select the columns for meter and time and then:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1694944534725.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56696iD46886CE1F6E5459/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1694944534725.png" alt="hogi_0-1694944534725.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 09:55:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678502#M86483</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-17T09:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678503#M86484</link>
      <description>&lt;P&gt;To facilitate the task:&lt;/P&gt;&lt;P&gt;This is definitely a case that should be included in the&amp;nbsp;&lt;LI-MESSAGE title="Normalization GUI" uid="675055" url="https://community.jmp.com/t5/JMP-Add-Ins/Normalization-GUI/m-p/675055#U675055" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1694949516526.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56698iBD2B939E70D73BAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1694949516526.png" alt="hogi_0-1694949516526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 11:19:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678503#M86484</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-17T11:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678523#M86487</link>
      <description>&lt;P&gt;I do not know what the input file type is, but if it is and Excel file, or a .csv file your DateTime values should be read into JMP as JMP Date/Time values.&amp;nbsp; If not, you should take the time to convert them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is a simple example that might give you a leg up on calculating the usage data&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// Sort the data if not already sorted
dt &amp;lt;&amp;lt; sort( by( :MeterNumber, :DateTime ), Replace table( 1 ) );

// Create the new Usage column
dt &amp;lt;&amp;lt; New Column( "Usage",
	formula(
		//As Constant( Usage = 0 );
		If( :MeterNumber != Lag( :MeterNumber ),
			usage = 0,
			:Usage = :CounterValue - Lag( :CounterValue )
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Sep 2023 13:37:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678523#M86487</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-09-17T13:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678524#M86488</link>
      <description>&lt;P&gt;You can also use &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/statistical-functions-2.shtml?os=win&amp;amp;source=application#ww6133391" target="_blank" rel="noopener"&gt;Col Moving Average()&lt;/A&gt; to get the value from previous row (can make it easier when working with group columns)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

// sample data
dt = New Table("Untitled",
	Add Rows(6),
	Compress File When Saved(1),
	New Column("Meter", Character, "Nominal", Set Values({"A", "A", "A", "B", "B", "B"})),
	New Column("Time", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 1, 2, 3])),
	New Column("Value", Numeric, "Continuous", Format("Best", 12), Set Values([1, 0, 2, 0, 1, 2]))
);
// Data should be sorted by time


dt &amp;lt;&amp;lt; New Column("D", Numeric, Continuous, Formula(
	:Value - (Col Moving Average(:Value, 1, 1, 0, Meter) * 2 - :Value)
	// 2 * :Value - (Col Moving Average(:Value, 1, 1, 0, Meter) * 2
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Sep 2023 14:04:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678524#M86488</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-17T14:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678525#M86489</link>
      <description>&lt;P&gt;cool!&lt;/P&gt;&lt;P&gt;much more robust and compact :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 14:44:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678525#M86489</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-17T14:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678559#M86491</link>
      <description>Good advice. I will start my day tomorrow spending some time with datetime formatting.&lt;BR /&gt;&lt;BR /&gt;I have a bit difficult getting the syntax for your example and the previous one.&lt;BR /&gt;I am hoping I can use R /dplyr library in JMP? I think I can write something that does the trick</description>
      <pubDate>Sun, 17 Sep 2023 18:36:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678559#M86491</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-17T18:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678560#M86492</link>
      <description>&lt;P&gt;I have this R code that should do the trick.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;library(dplyr)&lt;BR /&gt;&lt;BR /&gt;your_data &amp;lt;- your_data %&amp;gt;%&lt;BR /&gt;arrange(MeterName, DateTime) %&amp;gt;%&lt;BR /&gt;group_by(MeterName) %&amp;gt;%&lt;BR /&gt;mutate(DeltaMeterValue = MeterValue - lag(MeterValue, default = first(MeterValue))) %&amp;gt;%&lt;BR /&gt;ungroup()&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 18:57:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678560#M86492</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-17T18:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678562#M86494</link>
      <description>&lt;P data-unlink="true"&gt;You can use R with JMP, but that solution looks fairly similar to the solution using &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/row-functions-2.shtml?os=win&amp;amp;source=application#ww2736368" target="_blank" rel="noopener"&gt;Lag()&lt;/A&gt; in JMP (you could also use &lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/row-functions-2.shtml#ww4976282" target="_blank" rel="noopener"&gt;Dif()&lt;/A&gt;). My solution with Col Moving Average is more difficult to understand but the idea is to use Col Moving Average to get the value of previous row.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/work-with-r.shtml#" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; Extending JMP &amp;gt; Work with R&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/r-integration-functions.shtml#" target="_blank" rel="noopener"&gt; JSL Syntax Reference &amp;gt; JSL Functions, Operators, and Messages &amp;gt; R Integration Functions&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 19:40:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678562#M86494</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-17T19:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678623#M86502</link>
      <description>&lt;P&gt;When I try to use any of the solutions here, I only get the first date (=0) and not the rest -I tried to sort in different ways to see if it is here I am doing something wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Udklip.PNG" style="width: 662px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56713iC2D723914D96C5B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Udklip.PNG" alt="Udklip.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 06:20:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678623#M86502</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-18T06:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678625#M86503</link>
      <description>&lt;P&gt;Your column names seem to be wrong, start by fixing those in the formula&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 06:42:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678625#M86503</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-18T06:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678633#M86505</link>
      <description>&lt;P&gt;Ah, I see the spelling error.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 09:17:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/678633#M86505</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-18T09:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679625#M86571</link>
      <description>&lt;P&gt;A build in function that calculates delta within groups would be good.&amp;nbsp;&lt;BR /&gt;I got it to work but I do have difficult understanding the scripting language, and I tried drag/drop making the formula from scratch but I simply cant get all the parts placed correctly as they are in the script you gave me here&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:35:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679625#M86571</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-20T12:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679633#M86572</link>
      <description>&lt;P&gt;Is there a description of the col moving average function?&amp;nbsp;&lt;BR /&gt;When I look in the support page the description dos not say anything about how many values it takes.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Col Moving Average&lt;/P&gt;&lt;P class=""&gt;Returns the moving average over a given interval based at the current row. Missing values are ignored&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:44:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679633#M86572</guid>
      <dc:creator>Prometheus</dc:creator>
      <dc:date>2023-09-20T12:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679637#M86573</link>
      <description>&lt;P&gt;There is a way to do this interactively. Right click on your grouping column and make it Group By column for new formulas (data must be sorted by groups and most likely by time or something similar)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1695213877812.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56782i40B08FBFEE900CA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1695213877812.png" alt="jthi_0-1695213877812.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Next right click on your calculation/value column and go to Row-&amp;gt;Difference&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1695213949191.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56785i5B4AB2923D7AE958/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1695213949191.png" alt="jthi_3-1695213949191.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With this you get a formula like&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1695213930672.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56784i9B79B495012AC119/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1695213930672.png" alt="jthi_2-1695213930672.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:46:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679637#M86573</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-20T12:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679638#M86574</link>
      <description>&lt;P&gt;I will try to upload a new version of the&amp;nbsp;&lt;LI-MESSAGE title="Normalization GUI" uid="675055" url="https://community.jmp.com/t5/JMP-Add-Ins/Normalization-GUI/m-p/675055#U675055" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;The new version has an option to calculate the difference to the previous row - based on the trick that&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;provided here.&lt;BR /&gt;Jarmo's code (via Col Moving Average) is much better than what you get via the right click new formula column menu :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;After the update, it will look like this.&lt;BR /&gt;New:&amp;nbsp; "N-1"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1695214660547.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56788i29AB370A82276736/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1695214660547.png" alt="hogi_0-1695214660547.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:58:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679638#M86574</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-20T12:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delta calculations</title>
      <link>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679641#M86575</link>
      <description>&lt;P&gt;I did provide link to the documentation in one of my posts:&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/statistical-functions-2.shtml?os=win&amp;amp;source=application#ww6133391" target="_blank" rel="noopener"&gt;JSL Syntax Reference &amp;gt; JSL Functions, Operators, and Messages &amp;gt; Statistical Functions - Col Moving Average&lt;/A&gt;&amp;nbsp;. In my opinion the documentation for Col Moving Average isn't very clear and usually I have to make some small tests to get it working properly (and remember how it works).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1695214119143.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56786i59760741354DB918/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1695214119143.png" alt="jthi_0-1695214119143.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Other place to find some documentation (sometimes different...) is Scripting Index from JMP's help menu&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1695214183815.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56787i09142798CBBEA3E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_1-1695214183815.png" alt="jthi_1-1695214183815.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:49:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delta-calculations/m-p/679641#M86575</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-20T12:49:55Z</dc:date>
    </item>
  </channel>
</rss>

