<?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 increment based on empty rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734340#M91525</link>
    <description>&lt;P&gt;Using formula with Lag() is most likely easiest option. Could you provide example with the result you want to have?&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 12:02:25 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-03-13T12:02:25Z</dc:date>
    <item>
      <title>How to increment based on empty rows</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734330#M91524</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'd like to create a new column formula that increments (1, 2, 3....) only when empty rows are found (e.g. column 7 below).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you have a solution?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LargeElk892_0-1710330375703.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/62165i19976DC4D00F4A49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LargeElk892_0-1710330375703.png" alt="LargeElk892_0-1710330375703.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 11:51:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734330#M91524</guid>
      <dc:creator>LargeElk892</dc:creator>
      <dc:date>2024-03-13T11:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to increment based on empty rows</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734340#M91525</link>
      <description>&lt;P&gt;Using formula with Lag() is most likely easiest option. Could you provide example with the result you want to have?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 12:02:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734340#M91525</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-03-13T12:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to increment based on empty rows</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734401#M91531</link>
      <description>&lt;P&gt;Here is one way to handle your issue.&amp;nbsp; Assuming that all of your columns are numeric, this will work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;As Constant(
	count = 1;
	lagFlag = 0;
	dt = Current Data Table();
);
If( Is Missing( Sum( dt[Row(), 0] ) ) == 0,
	If( lagFlag == 1,
		count++;
		lagFlag = 0;
	)
,
	lagFlag = 1
);

If( lagFlag == 0, count );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Mar 2024 13:29:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734401#M91531</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-03-13T13:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to increment based on empty rows</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734648#M91568</link>
      <description>&lt;P&gt;Thank you very much Jim! I took me quite some time to go through each block to understand the logic but I finally got it :D&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 21:51:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-increment-based-on-empty-rows/m-p/734648#M91568</guid>
      <dc:creator>LargeElk892</dc:creator>
      <dc:date>2024-03-13T21:51:37Z</dc:date>
    </item>
  </channel>
</rss>

