<?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: working backwards from an event in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/working-backwards-from-an-event/m-p/435438#M68463</link>
    <description>&lt;P&gt;This should work. Data has to be sorted and this will most likely have some errors if it cannot find Voltage Drop in the end of datatable (should be easy fix by checking if Loc(mdrops &amp;gt; row() is empty or if min() is missing)&lt;/P&gt;&lt;P&gt;With this formula you can get closest voltage related to row number:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;If(:C Code Desc != "Voltage Drop",
	m_drops = Loc(:C Code Desc &amp;lt;&amp;lt; get as matrix, "Voltage Drop");
	closest = m_drops[Min(Loc(m_drops &amp;gt; Row()))];
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can use that row number to get time of voltage drop with&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;:STARTTIME[:COLUMNRESULT]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with those two you should be able to calculate time differences in new formula (you can also combine all into one formula)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Nov 2021 06:06:58 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-11-11T06:06:58Z</dc:date>
    <item>
      <title>working backwards from an event</title>
      <link>https://community.jmp.com/t5/Discussions/working-backwards-from-an-event/m-p/435388#M68455</link>
      <description>&lt;P&gt;In my mini table (attached) I have 6 units. Each unit can have a particular event called "Voltage Drop".&lt;/P&gt;&lt;P&gt;I would like to add a column to my table that counts back from this event to any and all previous events that happened since the prior Voltage drop event for that unit and gives me the duration&amp;nbsp; from this event to the Voltage Drop event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:40:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/working-backwards-from-an-event/m-p/435388#M68455</guid>
      <dc:creator>fionaweston</dc:creator>
      <dc:date>2023-06-10T23:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: working backwards from an event</title>
      <link>https://community.jmp.com/t5/Discussions/working-backwards-from-an-event/m-p/435438#M68463</link>
      <description>&lt;P&gt;This should work. Data has to be sorted and this will most likely have some errors if it cannot find Voltage Drop in the end of datatable (should be easy fix by checking if Loc(mdrops &amp;gt; row() is empty or if min() is missing)&lt;/P&gt;&lt;P&gt;With this formula you can get closest voltage related to row number:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;If(:C Code Desc != "Voltage Drop",
	m_drops = Loc(:C Code Desc &amp;lt;&amp;lt; get as matrix, "Voltage Drop");
	closest = m_drops[Min(Loc(m_drops &amp;gt; Row()))];
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can use that row number to get time of voltage drop with&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;:STARTTIME[:COLUMNRESULT]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with those two you should be able to calculate time differences in new formula (you can also combine all into one formula)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 06:06:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/working-backwards-from-an-event/m-p/435438#M68463</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-11-11T06:06:58Z</dc:date>
    </item>
  </channel>
</rss>

