<?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 fill values in rows till the end of an item group? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-fill-values-in-rows-till-the-end-of-an-item-group/m-p/465574#M70956</link>
    <description>&lt;P&gt;Hi Georg,&lt;/P&gt;&lt;P&gt;thank you, it is working as desired&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2022 13:01:53 GMT</pubDate>
    <dc:creator>lukasz</dc:creator>
    <dc:date>2022-03-01T13:01:53Z</dc:date>
    <item>
      <title>How to fill values in rows till the end of an item group?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fill-values-in-rows-till-the-end-of-an-item-group/m-p/465163#M70927</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;How to fill the column Param3 so that we have ones from the matching position (coming from the comparison of column Param1 and Param2) till the end of each item group (see the picture bellow)?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table_final.JPG" style="width: 357px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40348i0888E21C50CA8209/image-dimensions/357x257?v=v2" width="357" height="257" role="button" title="table_final.JPG" alt="table_final.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I have now are only values in Param3 based on matching of Param1 and Param2. For that I use this really simple code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( i = 1, i &amp;lt;= N Rows( dt ), i++, 
	If( dt:Param1[i] == dt:Param2[i], 
		dt:Param3[i] = 1;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table_initial.JPG" style="width: 355px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40349i83FD90D60ED4FEEC/image-dimensions/355x229?v=v2" width="355" height="229" role="button" title="table_initial.JPG" alt="table_initial.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How to fill the Param3 column for further rows as shown in the first picture? I would appreciate for any suggestions.&lt;/P&gt;&lt;P&gt;Thank you and best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:44:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fill-values-in-rows-till-the-end-of-an-item-group/m-p/465163#M70927</guid>
      <dc:creator>lukasz</dc:creator>
      <dc:date>2023-06-10T23:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill values in rows till the end of an item group?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fill-values-in-rows-till-the-end-of-an-item-group/m-p/465195#M70930</link>
      <description>&lt;P&gt;Perhaps this will work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = New Table( "Test",
	Add Rows( 10 ),
	Compress File When Saved( 1 ),
	New Column( "item",
		Character,
		"Nominal",
		Set Values( {"item1", "item1", "item1", "item1", "item1", "item2", "item2", "item2", "item2", "item2"} )
	),
	New Column( "Param1", Character, "Nominal", Set Values( {"", "A", "", "", "", "", "", "B", "", ""} ) ),
	New Column( "Param2", Character, "Nominal", Set Values( {"A", "A", "A", "A", "A", "B", "B", "B", "B", "B"} ) ),
	New Column( "Param3", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [., ., ., ., ., ., ., ., ., .] ) )
);

Wait( 3 );

group = .;
For Each Row(
	If(
		dt:Param1 == dt:Param2,
			dt:Param3 = 1;
			group = dt:Param2;,
		dt:Param2 == group, dt:param3 = 1,
		.
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Feb 2022 13:34:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fill-values-in-rows-till-the-end-of-an-item-group/m-p/465195#M70930</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2022-02-28T13:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill values in rows till the end of an item group?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fill-values-in-rows-till-the-end-of-an-item-group/m-p/465574#M70956</link>
      <description>&lt;P&gt;Hi Georg,&lt;/P&gt;&lt;P&gt;thank you, it is working as desired&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 13:01:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fill-values-in-rows-till-the-end-of-an-item-group/m-p/465574#M70956</guid>
      <dc:creator>lukasz</dc:creator>
      <dc:date>2022-03-01T13:01:53Z</dc:date>
    </item>
  </channel>
</rss>

