<?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: How to find lowest date within set of days for each group in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459746#M70478</link>
    <description>&lt;P&gt;Try adding the Provider into the Grouping variables for the Col Cumulative Sum() function&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum( 1, :Name, :Provider, :Date )&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 09 Feb 2022 23:35:02 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-02-09T23:35:02Z</dc:date>
    <item>
      <title>How to find lowest date within set of days for each group</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459410#M70452</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find a way to make splitting my data by which visit it is is easier. I have data in the following format (this is of course, fake data):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Name&lt;/TD&gt;
&lt;TD&gt;Date&lt;/TD&gt;
&lt;TD&gt;Diagnosis&lt;/TD&gt;
&lt;TD&gt;Provider&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Bob&lt;/TD&gt;
&lt;TD&gt;1/1/18&lt;/TD&gt;
&lt;TD&gt;Rash&lt;/TD&gt;
&lt;TD&gt;Dr. Sally&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Bob&lt;/TD&gt;
&lt;TD&gt;1/1/18&lt;/TD&gt;
&lt;TD&gt;flat foot&lt;/TD&gt;
&lt;TD&gt;Dr. Jane&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Bob&lt;/TD&gt;
&lt;TD&gt;7/1/18&lt;/TD&gt;
&lt;TD&gt;Psoriasis&lt;/TD&gt;
&lt;TD&gt;Dr. Sally&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Mary&lt;/TD&gt;
&lt;TD&gt;1/1/18&lt;/TD&gt;
&lt;TD&gt;sprained ankle&lt;/TD&gt;
&lt;TD&gt;Dr. Jane&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Louis&lt;/TD&gt;
&lt;TD&gt;8/1/18&lt;/TD&gt;
&lt;TD&gt;Rash&lt;/TD&gt;
&lt;TD&gt;Dr. Sally&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to create a new column which has the "encounter number" for each one. So for Bob, both 1/1/18 visits would be labelled "1" in the new column, but his 7/1/18 visit would be labeled "2," and Louis' 8/1/18 visit would also be labelled "1." I would like to keep the data on diagnosis and provider for both, so that I can split the data by the provider later on. My thinking is an "if (Date is minimum for Name), then "1") then iterate up to whatever encounter number this is, which is a bit unwieldy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts on the best way to do this? Currently using JMP Pro 16.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 19:57:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459410#M70452</guid>
      <dc:creator>VariancePath361</dc:creator>
      <dc:date>2025-07-01T19:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to find lowest date within set of days for each group</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459430#M70453</link>
      <description>&lt;P&gt;The Col Cumulative Sum() function will give you the results you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1644372976689.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39792i205E0568796F5BA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1644372976689.png" alt="txnelson_0-1644372976689.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Use the following formula to generate the values for your encounter number column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum( 1, :Name, :Date )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Feb 2022 02:17:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459430#M70453</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-02-09T02:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to find lowest date within set of days for each group</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459745#M70477</link>
      <description>&lt;P&gt;Hi! Thanks for your reply. This works in theory, but in your example you can see that the 1/1/18 visits are 1/2 when they should both be "1" and the 7/1/18 visit isn't "2." Ideally I want a function or column which can tell me if this is the patients first time to the hospital, second time, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips or tricks to get this there?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Liz&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 22:32:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459745#M70477</guid>
      <dc:creator>VariancePath361</dc:creator>
      <dc:date>2022-02-09T22:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to find lowest date within set of days for each group</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459746#M70478</link>
      <description>&lt;P&gt;Try adding the Provider into the Grouping variables for the Col Cumulative Sum() function&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum( 1, :Name, :Provider, :Date )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Feb 2022 23:35:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-find-lowest-date-within-set-of-days-for-each-group/m-p/459746#M70478</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-02-09T23:35:02Z</dc:date>
    </item>
  </channel>
</rss>

